diff --git a/.dockerignore b/.dockerignore index 8bf65212..3729ff0c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -22,12 +22,4 @@ **/secrets.dev.yaml **/values.dev.yaml LICENSE -README.md -.git -**/bin/ -**/obj/ -.vscode/ -.dockerignore -.gitignore -README.md -*.md \ No newline at end of file +README.md \ No newline at end of file diff --git a/.forgejo/workflows/build-checkin.yml b/.forgejo/workflows/build-checkin.yml deleted file mode 100644 index 3971e9df..00000000 --- a/.forgejo/workflows/build-checkin.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Build & Deploy Checkin Service - -on: - push: - tags: - - "checkin-dev[0-9]+.[0-9]+.[0-9]+" - - "checkin-dev[0-9]+.[0-9]+.[0-9]+*" - workflow_dispatch: - -env: - REGISTRY: ${{ vars.CONTAINER_REGISTRY }} - REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }} - REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} - CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_OWNER }} - IMAGE_VERSION: latest - SERVICE_NAME: hrms-api-checkin - DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }} - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Tag Version - shell: bash - run: | - if [[ "${{ github.event_name }}" == "push" ]]; then - VERSION=$(echo "${{ github.ref_name }}" | sed 's/checkin-dev//g') - echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV - else - echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV - fi - - name: Login in to registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ env.REGISTRY_USERNAME }} - password: ${{ env.REGISTRY_PASSWORD }} - - - name: Build and push docker image - uses: docker/build-push-action@v5 - with: - platforms: linux/amd64 - context: . - file: ./BMA.EHR.CheckInConsumer/Dockerfile - tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:${{ env.IMAGE_VERSION }} - push: true - - - name: Remote Deploy - uses: appleboy/ssh-action@v1.2.1 - with: - host: ${{ vars.SSH_DEPLOY_HOST }} - port: ${{ vars.SSH_DEPLOY_PORT }} - username: ${{ secrets.SSH_DEPLOY_USER }} - password: ${{ secrets.SSH_DEPLOY_PASSWORD }} - script: | - cd ~/repo - ./replace-env.sh API_CHECKIN "${{ env.IMAGE_VERSION }}" - ./deploy.sh ${{ env.SERVICE_NAME }} - - - name: Discord Notification - if: always() - run: | - STATUS="${{ job.status == 'success' && '✅ Success' || '❌ Failed' }}" - COLOR="${{ job.status == 'success' && '3066993' || '15158332' }}" - TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ) - curl -H "Content-Type: application/json" \ - -X POST \ - -d "{ - \"embeds\": [{ - \"title\": \"$STATUS\", - \"description\": \"**Build & Deploy**\\n- Image: \`${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\", - \"color\": $COLOR, - \"footer\": { - \"text\": \"Release Notification\", - \"icon_url\": \"https://example.com/success-icon.png\" - }, - \"timestamp\": \"$TIMESTAMP\" - }] - }" \ - ${{ env.DISCORD_WEBHOOK }} diff --git a/.forgejo/workflows/build-discipline.yml b/.forgejo/workflows/build-discipline.yml deleted file mode 100644 index 767d775b..00000000 --- a/.forgejo/workflows/build-discipline.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Build & Deploy Discipline Service - -on: - push: - tags: - - "discipline-dev[0-9]+.[0-9]+.[0-9]+" - - "discipline-dev[0-9]+.[0-9]+.[0-9]+*" - workflow_dispatch: - -env: - REGISTRY: ${{ vars.CONTAINER_REGISTRY }} - REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }} - REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} - CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_OWNER }} - IMAGE_VERSION: latest - SERVICE_NAME: hrms-api-discipline - DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }} - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Tag Version - shell: bash - run: | - if [[ "${{ github.event_name }}" == "push" ]]; then - VERSION=$(echo "${{ github.ref_name }}" | sed 's/discipline-dev//g') - echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV - else - echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV - fi - - name: Login in to registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ env.REGISTRY_USERNAME }} - password: ${{ env.REGISTRY_PASSWORD }} - - - name: Build and push docker image - uses: docker/build-push-action@v5 - with: - platforms: linux/amd64 - context: . - file: ./BMA.EHR.Discipline.Service/Dockerfile - tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:${{ env.IMAGE_VERSION }} - push: true - - - name: Remote Deploy - uses: appleboy/ssh-action@v1.2.1 - with: - host: ${{ vars.SSH_DEPLOY_HOST }} - port: ${{ vars.SSH_DEPLOY_PORT }} - username: ${{ secrets.SSH_DEPLOY_USER }} - password: ${{ secrets.SSH_DEPLOY_PASSWORD }} - script: | - cd ~/repo - ./replace-env.sh API_DISCIPLINE "${{ env.IMAGE_VERSION }}" - ./deploy.sh ${{ env.SERVICE_NAME }} - - - name: Discord Notification - if: always() - run: | - STATUS="${{ job.status == 'success' && '✅ Success' || '❌ Failed' }}" - COLOR="${{ job.status == 'success' && '3066993' || '15158332' }}" - TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ) - curl -H "Content-Type: application/json" \ - -X POST \ - -d "{ - \"embeds\": [{ - \"title\": \"$STATUS\", - \"description\": \"**Build & Deploy**\\n- Image: \`${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\", - \"color\": $COLOR, - \"footer\": { - \"text\": \"Release Notification\", - \"icon_url\": \"https://example.com/success-icon.png\" - }, - \"timestamp\": \"$TIMESTAMP\" - }] - }" \ - ${{ env.DISCORD_WEBHOOK }} diff --git a/.forgejo/workflows/build-insignia.yml b/.forgejo/workflows/build-insignia.yml deleted file mode 100644 index 7ddcbdbd..00000000 --- a/.forgejo/workflows/build-insignia.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Build & Deploy Insignia Service - -on: - push: - tags: - - "insignia-dev[0-9]+.[0-9]+.[0-9]+" - - "insignia-dev[0-9]+.[0-9]+.[0-9]+*" - workflow_dispatch: - -env: - REGISTRY: ${{ vars.CONTAINER_REGISTRY }} - REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }} - REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} - CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_OWNER }} - IMAGE_VERSION: latest - SERVICE_NAME: hrms-api-insignia - DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }} - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Tag Version - shell: bash - run: | - if [[ "${{ github.event_name }}" == "push" ]]; then - VERSION=$(echo "${{ github.ref_name }}" | sed 's/insignia-dev//g') - echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV - else - echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV - fi - - name: Login in to registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ env.REGISTRY_USERNAME }} - password: ${{ env.REGISTRY_PASSWORD }} - - - name: Build and push docker image - uses: docker/build-push-action@v5 - with: - platforms: linux/amd64 - context: . - file: ./BMA.EHR.Insignia/Dockerfile - tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:${{ env.IMAGE_VERSION }} - push: true - - - name: Remote Deploy - uses: appleboy/ssh-action@v1.2.1 - with: - host: ${{ vars.SSH_DEPLOY_HOST }} - port: ${{ vars.SSH_DEPLOY_PORT }} - username: ${{ secrets.SSH_DEPLOY_USER }} - password: ${{ secrets.SSH_DEPLOY_PASSWORD }} - script: | - cd ~/repo - ./replace-env.sh API_INSIGNIA "${{ env.IMAGE_VERSION }}" - ./deploy.sh ${{ env.SERVICE_NAME }} - - - name: Discord Notification - if: always() - run: | - STATUS="${{ job.status == 'success' && '✅ Success' || '❌ Failed' }}" - COLOR="${{ job.status == 'success' && '3066993' || '15158332' }}" - TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ) - curl -H "Content-Type: application/json" \ - -X POST \ - -d "{ - \"embeds\": [{ - \"title\": \"$STATUS\", - \"description\": \"**Build & Deploy**\\n- Image: \`${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\", - \"color\": $COLOR, - \"footer\": { - \"text\": \"Release Notification\", - \"icon_url\": \"https://example.com/success-icon.png\" - }, - \"timestamp\": \"$TIMESTAMP\" - }] - }" \ - ${{ env.DISCORD_WEBHOOK }} diff --git a/.forgejo/workflows/build-leave.yml b/.forgejo/workflows/build-leave.yml deleted file mode 100644 index b1c9c168..00000000 --- a/.forgejo/workflows/build-leave.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Build & Deploy Leave Service - -on: - push: - tags: - - "leave-dev[0-9]+.[0-9]+.[0-9]+" - - "leave-dev[0-9]+.[0-9]+.[0-9]+*" - workflow_dispatch: - -env: - REGISTRY: ${{ vars.CONTAINER_REGISTRY }} - REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }} - REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} - CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_OWNER }} - IMAGE_VERSION: latest - SERVICE_NAME: hrms-api-leave - DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }} - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Tag Version - shell: bash - run: | - if [[ "${{ github.event_name }}" == "push" ]]; then - VERSION=$(echo "${{ github.ref_name }}" | sed 's/leave-dev//g') - echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV - else - echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV - fi - - name: Login in to registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ env.REGISTRY_USERNAME }} - password: ${{ env.REGISTRY_PASSWORD }} - - - name: Build and push docker image - uses: docker/build-push-action@v5 - with: - platforms: linux/amd64 - context: . - file: ./BMA.EHR.Leave/Dockerfile - tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:${{ env.IMAGE_VERSION }} - push: true - - - name: Remote Deploy - uses: appleboy/ssh-action@v1.2.1 - with: - host: ${{ vars.SSH_DEPLOY_HOST }} - port: ${{ vars.SSH_DEPLOY_PORT }} - username: ${{ secrets.SSH_DEPLOY_USER }} - password: ${{ secrets.SSH_DEPLOY_PASSWORD }} - script: | - cd ~/repo - ./replace-env.sh API_LEAVE "${{ env.IMAGE_VERSION }}" - ./deploy.sh ${{ env.SERVICE_NAME }} - - - name: Discord Notification - if: always() - run: | - STATUS="${{ job.status == 'success' && '✅ Success' || '❌ Failed' }}" - COLOR="${{ job.status == 'success' && '3066993' || '15158332' }}" - TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ) - curl -H "Content-Type: application/json" \ - -X POST \ - -d "{ - \"embeds\": [{ - \"title\": \"$STATUS\", - \"description\": \"**Build & Deploy**\\n- Image: \`${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\", - \"color\": $COLOR, - \"footer\": { - \"text\": \"Release Notification\", - \"icon_url\": \"https://example.com/success-icon.png\" - }, - \"timestamp\": \"$TIMESTAMP\" - }] - }" \ - ${{ env.DISCORD_WEBHOOK }} diff --git a/.forgejo/workflows/build-placement.yml b/.forgejo/workflows/build-placement.yml deleted file mode 100644 index 351b1e59..00000000 --- a/.forgejo/workflows/build-placement.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Build & Deploy Placement Service - -on: - push: - tags: - - "placement-dev[0-9]+.[0-9]+.[0-9]+" - - "placement-dev[0-9]+.[0-9]+.[0-9]+*" - workflow_dispatch: - -env: - REGISTRY: ${{ vars.CONTAINER_REGISTRY }} - REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }} - REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} - CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_OWNER }} - IMAGE_VERSION: latest - SERVICE_NAME: hrms-api-placement - DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }} - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Tag Version - shell: bash - run: | - if [[ "${{ github.event_name }}" == "push" ]]; then - VERSION=$(echo "${{ github.ref_name }}" | sed 's/placement-dev//g') - echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV - else - echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV - fi - - name: Login in to registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ env.REGISTRY_USERNAME }} - password: ${{ env.REGISTRY_PASSWORD }} - - - name: Build and push docker image - uses: docker/build-push-action@v5 - with: - platforms: linux/amd64 - context: . - file: ./BMA.EHR.Placement.Service/Dockerfile - tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:${{ env.IMAGE_VERSION }} - push: true - - - name: Remote Deploy - uses: appleboy/ssh-action@v1.2.1 - with: - host: ${{ vars.SSH_DEPLOY_HOST }} - port: ${{ vars.SSH_DEPLOY_PORT }} - username: ${{ secrets.SSH_DEPLOY_USER }} - password: ${{ secrets.SSH_DEPLOY_PASSWORD }} - script: | - cd ~/repo - ./replace-env.sh API_PLACEMENT "${{ env.IMAGE_VERSION }}" - ./deploy.sh ${{ env.SERVICE_NAME }} - - - name: Discord Notification - if: always() - run: | - STATUS="${{ job.status == 'success' && '✅ Success' || '❌ Failed' }}" - COLOR="${{ job.status == 'success' && '3066993' || '15158332' }}" - TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ) - curl -H "Content-Type: application/json" \ - -X POST \ - -d "{ - \"embeds\": [{ - \"title\": \"$STATUS\", - \"description\": \"**Build & Deploy**\\n- Image: \`${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\", - \"color\": $COLOR, - \"footer\": { - \"text\": \"Release Notification\", - \"icon_url\": \"https://example.com/success-icon.png\" - }, - \"timestamp\": \"$TIMESTAMP\" - }] - }" \ - ${{ env.DISCORD_WEBHOOK }} diff --git a/.forgejo/workflows/build-retirement.yml b/.forgejo/workflows/build-retirement.yml deleted file mode 100644 index 257f68f2..00000000 --- a/.forgejo/workflows/build-retirement.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Build & Deploy Retirement Service - -on: - push: - tags: - - "retirement-dev[0-9]+.[0-9]+.[0-9]+" - - "retirement-dev[0-9]+.[0-9]+.[0-9]+*" - workflow_dispatch: - -env: - REGISTRY: ${{ vars.CONTAINER_REGISTRY }} - REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }} - REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} - CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_OWNER }} - IMAGE_VERSION: latest - SERVICE_NAME: hrms-api-retirement - DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }} - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Tag Version - shell: bash - run: | - if [[ "${{ github.event_name }}" == "push" ]]; then - VERSION=$(echo "${{ github.ref_name }}" | sed 's/retirement-dev//g') - echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV - else - echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV - fi - - name: Login in to registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ env.REGISTRY_USERNAME }} - password: ${{ env.REGISTRY_PASSWORD }} - - - name: Build and push docker image - uses: docker/build-push-action@v5 - with: - platforms: linux/amd64 - context: . - file: ./BMA.EHR.Retirement.Service/Dockerfile - tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:${{ env.IMAGE_VERSION }} - push: true - - - name: Remote Deploy - uses: appleboy/ssh-action@v1.2.1 - with: - host: ${{ vars.SSH_DEPLOY_HOST }} - port: ${{ vars.SSH_DEPLOY_PORT }} - username: ${{ secrets.SSH_DEPLOY_USER }} - password: ${{ secrets.SSH_DEPLOY_PASSWORD }} - script: | - cd ~/repo - ./replace-env.sh API_RETIREMENT "${{ env.IMAGE_VERSION }}" - ./deploy.sh ${{ env.SERVICE_NAME }} - - - name: Discord Notification - if: always() - run: | - STATUS="${{ job.status == 'success' && '✅ Success' || '❌ Failed' }}" - COLOR="${{ job.status == 'success' && '3066993' || '15158332' }}" - TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ) - curl -H "Content-Type: application/json" \ - -X POST \ - -d "{ - \"embeds\": [{ - \"title\": \"$STATUS\", - \"description\": \"**Build & Deploy**\\n- Image: \`${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\", - \"color\": $COLOR, - \"footer\": { - \"text\": \"Release Notification\", - \"icon_url\": \"https://example.com/success-icon.png\" - }, - \"timestamp\": \"$TIMESTAMP\" - }] - }" \ - ${{ env.DISCORD_WEBHOOK }} diff --git a/.github/workflows/discord-notify.yml b/.github/workflows/discord-notify.yml deleted file mode 100644 index ce4ee51d..00000000 --- a/.github/workflows/discord-notify.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Discord PR Notify - -on: - pull_request: - types: [opened] - -jobs: - discord: - runs-on: ubuntu-latest - steps: - - name: Send Discord - run: | - curl -X POST "${{ secrets.DISCORD_WEBHOOK_PULLREQUEST }}" \ - -H "Content-Type: application/json" \ - -d '{ - "embeds": [{ - "title": "🔔 **Service:** ${{ github.repository }}", - "description": "👤 **Author:** ${{ github.event.pull_request.user.login }}\n🌿 **Branch:** ${{ github.event.pull_request.head.ref }} → ${{ github.event.pull_request.base.ref }}\n📦 **Pull Request:** [#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})", - "color": 5814783, - "timestamp": "${{ github.event.pull_request.created_at }}" - }] - }' diff --git a/.github/workflows/dockerhub-release-checkin.yaml b/.github/workflows/dockerhub-release-checkin.yaml deleted file mode 100644 index b80c44f7..00000000 --- a/.github/workflows/dockerhub-release-checkin.yaml +++ /dev/null @@ -1,101 +0,0 @@ -name: DockerHub Release - CheckIn Consumer -run-name: DockerHub Release - CheckIn Consumer by ${{ github.actor }} -on: - push: - tags: - - "checkin-[0-9]+.[0-9]+.[0-9]+" - workflow_dispatch: - inputs: - IMAGE_VER: - description: "Image version (e.g., latest, v1.0.0)" - required: false - default: "latest" - -env: - DOCKERHUB_REGISTRY: docker.io - IMAGE_NAME: hrms-api-checkin - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - -jobs: - release-to-dockerhub: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - - name: Generate version - id: gen_ver - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} - else - IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - fi - if [[ $IMAGE_VER == '' ]]; then - IMAGE_VER='test-vBeta' - fi - echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT - echo "Generated version: ${IMAGE_VER}" - - - name: Display version - run: | - echo "Git Ref: $GITHUB_REF" - echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}" - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{env.DOCKERHUB_REGISTRY}} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: BMA.EHR.CheckInConsumer/Dockerfile - platforms: linux/amd64 - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }} - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest - labels: | - org.opencontainers.image.title=BMA EHR CheckIn Consumer - org.opencontainers.image.description=HRMS CheckIn Consumer Service - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Notify Discord on success - if: success() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="✅ DockerHub release succeeded\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" - - - name: Notify Discord on failure - if: failure() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="❌ DockerHub release failed\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" diff --git a/.github/workflows/dockerhub-release-command.yaml b/.github/workflows/dockerhub-release-command.yaml deleted file mode 100644 index 571fd6c9..00000000 --- a/.github/workflows/dockerhub-release-command.yaml +++ /dev/null @@ -1,101 +0,0 @@ -name: DockerHub Release - Command Service -run-name: DockerHub Release - Command Service by ${{ github.actor }} -on: - push: - tags: - - "command-[0-9]+.[0-9]+.[0-9]+" - workflow_dispatch: - inputs: - IMAGE_VER: - description: "Image version (e.g., latest, v1.0.0)" - required: false - default: "latest" - -env: - DOCKERHUB_REGISTRY: docker.io - IMAGE_NAME: hrms-api-command - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - -jobs: - release-to-dockerhub: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - - name: Generate version - id: gen_ver - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} - else - IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - fi - if [[ $IMAGE_VER == '' ]]; then - IMAGE_VER='test-vBeta' - fi - echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT - echo "Generated version: ${IMAGE_VER}" - - - name: Display version - run: | - echo "Git Ref: $GITHUB_REF" - echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}" - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{env.DOCKERHUB_REGISTRY}} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: BMA.EHR.Command.Service/Dockerfile - platforms: linux/amd64 - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }} - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest - labels: | - org.opencontainers.image.title=BMA EHR Command Service - org.opencontainers.image.description=HRMS Command API Service - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Notify Discord on success - if: success() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="✅ DockerHub release succeeded\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" - - - name: Notify Discord on failure - if: failure() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="❌ DockerHub release failed\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" diff --git a/.github/workflows/dockerhub-release-discipline.yaml b/.github/workflows/dockerhub-release-discipline.yaml deleted file mode 100644 index f4642bd8..00000000 --- a/.github/workflows/dockerhub-release-discipline.yaml +++ /dev/null @@ -1,101 +0,0 @@ -name: DockerHub Release - Discipline Service -run-name: DockerHub Release - Discipline Service by ${{ github.actor }} -on: - push: - tags: - - "discipline-[0-9]+.[0-9]+.[0-9]+" - workflow_dispatch: - inputs: - IMAGE_VER: - description: "Image version (e.g., latest, v1.0.0)" - required: false - default: "latest" - -env: - DOCKERHUB_REGISTRY: docker.io - IMAGE_NAME: hrms-api-discipline - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - -jobs: - release-to-dockerhub: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - - name: Generate version - id: gen_ver - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} - else - IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - fi - if [[ $IMAGE_VER == '' ]]; then - IMAGE_VER='test-vBeta' - fi - echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT - echo "Generated version: ${IMAGE_VER}" - - - name: Display version - run: | - echo "Git Ref: $GITHUB_REF" - echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}" - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{env.DOCKERHUB_REGISTRY}} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: BMA.EHR.Discipline.Service/Dockerfile - platforms: linux/amd64 - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }} - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest - labels: | - org.opencontainers.image.title=BMA EHR Discipline Service - org.opencontainers.image.description=HRMS Discipline API Service - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Notify Discord on success - if: success() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="✅ DockerHub release succeeded\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" - - - name: Notify Discord on failure - if: failure() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="❌ DockerHub release failed\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" diff --git a/.github/workflows/dockerhub-release-insignia.yaml b/.github/workflows/dockerhub-release-insignia.yaml deleted file mode 100644 index 79d89963..00000000 --- a/.github/workflows/dockerhub-release-insignia.yaml +++ /dev/null @@ -1,101 +0,0 @@ -name: DockerHub Release - Insignia Service -run-name: DockerHub Release - Insignia Service by ${{ github.actor }} -on: - push: - tags: - - "insignia-[0-9]+.[0-9]+.[0-9]+" - workflow_dispatch: - inputs: - IMAGE_VER: - description: "Image version (e.g., latest, v1.0.0)" - required: false - default: "latest" - -env: - DOCKERHUB_REGISTRY: docker.io - IMAGE_NAME: hrms-api-insignia - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - -jobs: - release-to-dockerhub: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - - name: Generate version - id: gen_ver - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} - else - IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - fi - if [[ $IMAGE_VER == '' ]]; then - IMAGE_VER='test-vBeta' - fi - echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT - echo "Generated version: ${IMAGE_VER}" - - - name: Display version - run: | - echo "Git Ref: $GITHUB_REF" - echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}" - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{env.DOCKERHUB_REGISTRY}} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: BMA.EHR.Insignia/Dockerfile - platforms: linux/amd64 - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }} - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest - labels: | - org.opencontainers.image.title=BMA EHR Insignia Service - org.opencontainers.image.description=HRMS Insignia API Service - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Notify Discord on success - if: success() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="✅ DockerHub release succeeded\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" - - - name: Notify Discord on failure - if: failure() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="❌ DockerHub release failed\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" diff --git a/.github/workflows/dockerhub-release-leave.yaml b/.github/workflows/dockerhub-release-leave.yaml deleted file mode 100644 index f9c2e0ba..00000000 --- a/.github/workflows/dockerhub-release-leave.yaml +++ /dev/null @@ -1,119 +0,0 @@ -name: DockerHub Release - Leave Service -run-name: DockerHub Release - Leave Service by ${{ github.actor }} -on: - push: - tags: - - "leave-[0-9]+.[0-9]+.[0-9]+" - # branches: - # - main - # - develop - workflow_dispatch: - inputs: - IMAGE_VER: - description: "Image version (e.g., latest, v1.0.0)" - required: false - default: "latest" - -env: - DOCKERHUB_REGISTRY: docker.io - IMAGE_NAME: hrms-api-leave - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - -jobs: - release-to-dockerhub: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - - name: Generate version - id: gen_ver - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} - elif [[ $GITHUB_REF == 'refs/heads/'* ]]; then - BRANCH_NAME=${GITHUB_REF#refs/heads/} - IMAGE_VER="${BRANCH_NAME}-latest" - else - IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - fi - if [[ $IMAGE_VER == '' ]]; then - IMAGE_VER='test-vBeta' - fi - echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT - echo "Generated version: ${IMAGE_VER}" - - - name: Display version - run: | - echo "Git Ref: $GITHUB_REF" - echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}" - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{env.DOCKERHUB_REGISTRY}} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Extract metadata for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }} - tags: | - type=ref,event=tag - type=ref,event=branch - type=raw,value=${{ steps.gen_ver.outputs.image_ver }} - type=raw,value=latest,enable={{is_default_branch}} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: BMA.EHR.Leave/Dockerfile - platforms: linux/amd64 - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }} - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Image digest - run: echo "Image pushed with digest ${{ steps.build.outputs.digest }}" - - - name: Notify Discord on success - if: success() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="✅ DockerHub release succeeded\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" - - - name: Notify Discord on failure - if: failure() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="❌ DockerHub release failed\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" diff --git a/.github/workflows/dockerhub-release-placement.yaml b/.github/workflows/dockerhub-release-placement.yaml deleted file mode 100644 index d4e3dade..00000000 --- a/.github/workflows/dockerhub-release-placement.yaml +++ /dev/null @@ -1,101 +0,0 @@ -name: DockerHub Release - Placement Service -run-name: DockerHub Release - Placement Service by ${{ github.actor }} -on: - push: - tags: - - "placement-[0-9]+.[0-9]+.[0-9]+" - workflow_dispatch: - inputs: - IMAGE_VER: - description: "Image version (e.g., latest, v1.0.0)" - required: false - default: "latest" - -env: - DOCKERHUB_REGISTRY: docker.io - IMAGE_NAME: hrms-api-placement - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - -jobs: - release-to-dockerhub: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - - name: Generate version - id: gen_ver - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} - else - IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - fi - if [[ $IMAGE_VER == '' ]]; then - IMAGE_VER='test-vBeta' - fi - echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT - echo "Generated version: ${IMAGE_VER}" - - - name: Display version - run: | - echo "Git Ref: $GITHUB_REF" - echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}" - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{env.DOCKERHUB_REGISTRY}} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: BMA.EHR.Placement.Service/Dockerfile - platforms: linux/amd64 - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }} - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest - labels: | - org.opencontainers.image.title=BMA EHR Placement Service - org.opencontainers.image.description=HRMS Placement API Service - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Notify Discord on success - if: success() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="✅ DockerHub release succeeded\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" - - - name: Notify Discord on failure - if: failure() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="❌ DockerHub release failed\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" diff --git a/.github/workflows/dockerhub-release-reportv2.yaml b/.github/workflows/dockerhub-release-reportv2.yaml deleted file mode 100644 index 4dc73f3f..00000000 --- a/.github/workflows/dockerhub-release-reportv2.yaml +++ /dev/null @@ -1,101 +0,0 @@ -name: DockerHub Release - Report Service -run-name: DockerHub Release - Report Service by ${{ github.actor }} -on: - push: - tags: - - "reportv2-[0-9]+.[0-9]+.[0-9]+" - workflow_dispatch: - inputs: - IMAGE_VER: - description: "Image version (e.g., latest, v1.0.0)" - required: false - default: "latest" - -env: - DOCKERHUB_REGISTRY: docker.io - IMAGE_NAME: hrms-api-reportv2 - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - -jobs: - release-to-dockerhub: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - - name: Generate version - id: gen_ver - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} - else - IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - fi - if [[ $IMAGE_VER == '' ]]; then - IMAGE_VER='test-vBeta' - fi - echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT - echo "Generated version: ${IMAGE_VER}" - - - name: Display version - run: | - echo "Git Ref: $GITHUB_REF" - echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}" - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{env.DOCKERHUB_REGISTRY}} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: BMA.EHR.Report.Service/Dockerfile - platforms: linux/amd64 - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }} - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest - labels: | - org.opencontainers.image.title=BMA EHR Report Service - org.opencontainers.image.description=HRMS Report API Service - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Notify Discord on success - if: success() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="✅ DockerHub release succeeded\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" - - - name: Notify Discord on failure - if: failure() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="❌ DockerHub release failed\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" diff --git a/.github/workflows/dockerhub-release-retirement.yaml b/.github/workflows/dockerhub-release-retirement.yaml deleted file mode 100644 index 50ace5cd..00000000 --- a/.github/workflows/dockerhub-release-retirement.yaml +++ /dev/null @@ -1,101 +0,0 @@ -name: DockerHub Release - Retirement Service -run-name: DockerHub Release - Retirement Service by ${{ github.actor }} -on: - push: - tags: - - "retirement-[0-9]+.[0-9]+.[0-9]+" - workflow_dispatch: - inputs: - IMAGE_VER: - description: "Image version (e.g., latest, v1.0.0)" - required: false - default: "latest" - -env: - DOCKERHUB_REGISTRY: docker.io - IMAGE_NAME: hrms-api-retirement - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - -jobs: - release-to-dockerhub: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - - name: Generate version - id: gen_ver - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} - else - IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - fi - if [[ $IMAGE_VER == '' ]]; then - IMAGE_VER='test-vBeta' - fi - echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT - echo "Generated version: ${IMAGE_VER}" - - - name: Display version - run: | - echo "Git Ref: $GITHUB_REF" - echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}" - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{env.DOCKERHUB_REGISTRY}} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: BMA.EHR.Retirement.Service/Dockerfile - platforms: linux/amd64 - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }} - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest - labels: | - org.opencontainers.image.title=BMA EHR Retirement Service - org.opencontainers.image.description=HRMS Retirement API Service - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Notify Discord on success - if: success() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="✅ DockerHub release succeeded\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" - - - name: Notify Discord on failure - if: failure() - env: - IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }} - run: | - TAG_INFO="Tag: ${IMAGE_VER:-unknown}" - REF_INFO="Ref: ${GITHUB_REF}" - ACTOR_INFO="Actor: ${GITHUB_ACTOR}" - MSG="❌ DockerHub release failed\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}" - curl -s -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"${MSG}\"}" \ - "$DISCORD_WEBHOOK" diff --git a/.github/workflows/release_Retirement.yaml b/.github/workflows/release_Retirement.yaml index 3fd5bedf..6cdceae0 100644 --- a/.github/workflows/release_Retirement.yaml +++ b/.github/workflows/release_Retirement.yaml @@ -1,9 +1,9 @@ name: release-dev run-name: release-dev ${{ github.actor }} on: - # push: - # tags: - # - "retirement-[0-9]+.[0-9]+.[0-9]+" + push: + tags: + - "retirement-[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: env: REGISTRY: docker.frappet.com diff --git a/.github/workflows/release_checkin_consumer.yaml b/.github/workflows/release_checkin_consumer.yaml index f9081264..31b015e6 100644 --- a/.github/workflows/release_checkin_consumer.yaml +++ b/.github/workflows/release_checkin_consumer.yaml @@ -1,9 +1,9 @@ name: release-dev run-name: release-dev ${{ github.actor }} on: - # push: - # tags: - # - "consumer-[0-9]+.[0-9]+.[0-9]+" + push: + tags: + - "consumer-[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: env: REGISTRY: docker.frappet.com diff --git a/.github/workflows/release_command.yaml b/.github/workflows/release_command.yaml index dba3012e..d5bf4309 100644 --- a/.github/workflows/release_command.yaml +++ b/.github/workflows/release_command.yaml @@ -1,9 +1,9 @@ name: release-dev run-name: release-dev ${{ github.actor }} on: - # push: - # tags: - # - "command-[0-9]+.[0-9]+.[0-9]+" + push: + tags: + - "command-[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: env: REGISTRY: docker.frappet.com @@ -20,14 +20,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + # skip Set up QEMU because it fail on act and container - name: Gen Version id: gen_ver run: | if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} + IMAGE_VER='${GITHUB_REF/refs\/tags\//}' else IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} fi @@ -35,7 +33,7 @@ jobs: IMAGE_VER='test-vBeta' fi echo '::set-output name=image_ver::'$IMAGE_VER - - name: Check Version + - name: Test Version run: | echo $GITHUB_REF echo ${{ steps.gen_ver.outputs.image_ver }} diff --git a/.github/workflows/release_discipline.yaml b/.github/workflows/release_discipline.yaml index f4cb42da..80639a84 100644 --- a/.github/workflows/release_discipline.yaml +++ b/.github/workflows/release_discipline.yaml @@ -1,107 +1,107 @@ name: release-dev run-name: release-dev ${{ github.actor }} on: - # push: - # tags: - # - "discipline-[0-9]+.[0-9]+.[0-9]+" + push: + tags: + - "discipline-[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: env: - REGISTRY: docker.frappet.com - IMAGE_NAME: ehr/bma-ehr-discipline-service - DEPLOY_HOST: frappet.com - DEPLOY_PORT: 10102 - # COMPOSE_PATH: /home/frappet/docker/bma-ehr - COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-discipline - TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 + REGISTRY: docker.frappet.com + IMAGE_NAME: ehr/bma-ehr-discipline-service + DEPLOY_HOST: frappet.com + DEPLOY_PORT: 10102 + # COMPOSE_PATH: /home/frappet/docker/bma-ehr + COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-discipline + TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: - # act workflow_dispatch -W .github/workflows/release_discipline.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 - release-dev: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - name: Gen Version - id: gen_ver - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} - else - IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - fi - if [[ $IMAGE_VER == '' ]]; then - IMAGE_VER='test-vBeta' - fi - echo '::set-output name=image_ver::'$IMAGE_VER - - name: Check Version - run: | - echo $GITHUB_REF - echo ${{ steps.gen_ver.outputs.image_ver }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login in to registry - uses: docker/login-action@v2 - with: - registry: ${{env.REGISTRY}} - username: ${{secrets.DOCKER_USER}} - password: ${{secrets.DOCKER_PASS}} - - name: Build and load local docker image - uses: docker/build-push-action@v3 - with: - context: . - platforms: linux/amd64 - file: BMA.EHR.Discipline.Service/Dockerfile - push: true - tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest + # act workflow_dispatch -W .github/workflows/release_discipline.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 + release-dev: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set output tags + id: vars + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + - name: Gen Version + id: gen_ver + run: | + if [[ $GITHUB_REF == 'refs/tags/'* ]]; then + IMAGE_VER=${{ steps.vars.outputs.tag }} + else + IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} + fi + if [[ $IMAGE_VER == '' ]]; then + IMAGE_VER='test-vBeta' + fi + echo '::set-output name=image_ver::'$IMAGE_VER + - name: Check Version + run: | + echo $GITHUB_REF + echo ${{ steps.gen_ver.outputs.image_ver }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login in to registry + uses: docker/login-action@v2 + with: + registry: ${{env.REGISTRY}} + username: ${{secrets.DOCKER_USER}} + password: ${{secrets.DOCKER_PASS}} + - name: Build and load local docker image + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + file: BMA.EHR.Discipline.Service/Dockerfile + push: true + tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest - - name: Reload docker compose - uses: appleboy/ssh-action@v0.1.8 - with: - host: ${{env.DEPLOY_HOST}} - username: frappet - password: ${{ secrets.SSH_PASSWORD }} - port: ${{env.DEPLOY_PORT}} - script: | - cd "${{env.COMPOSE_PATH}}" - docker compose pull - docker compose up -d - echo "${{ steps.gen_ver.outputs.image_ver }}"> success - - name: Notify Discord Success - if: success() - run: | - curl -H "Content-Type: application/json" \ - -X POST \ - -d '{ - "embeds": [{ - "title": "✅ Deployment Success!", - "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`", - "color": 3066993, - "footer": { - "text": "Release Notification", - "icon_url": "https://example.com/success-icon.png" - }, - "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" - }] - }' \ - ${{ secrets.DISCORD_WEBHOOK }} + - name: Reload docker compose + uses: appleboy/ssh-action@v0.1.8 + with: + host: ${{env.DEPLOY_HOST}} + username: frappet + password: ${{ secrets.SSH_PASSWORD }} + port: ${{env.DEPLOY_PORT}} + script: | + cd "${{env.COMPOSE_PATH}}" + docker compose pull + docker compose up -d + echo "${{ steps.gen_ver.outputs.image_ver }}"> success + - name: Notify Discord Success + if: success() + run: | + curl -H "Content-Type: application/json" \ + -X POST \ + -d '{ + "embeds": [{ + "title": "✅ Deployment Success!", + "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`", + "color": 3066993, + "footer": { + "text": "Release Notification", + "icon_url": "https://example.com/success-icon.png" + }, + "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" + }] + }' \ + ${{ secrets.DISCORD_WEBHOOK }} - - name: Notify Discord Failure - if: failure() - run: | - curl -H "Content-Type: application/json" \ - -X POST \ - -d '{ - "embeds": [{ - "title": "❌ Deployment Failed!", - "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`", - "color": 15158332, - "footer": { - "text": "Release Notification", - "icon_url": "https://example.com/failure-icon.png" - }, - "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" - }] - }' \ - ${{ secrets.DISCORD_WEBHOOK }} + - name: Notify Discord Failure + if: failure() + run: | + curl -H "Content-Type: application/json" \ + -X POST \ + -d '{ + "embeds": [{ + "title": "❌ Deployment Failed!", + "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`", + "color": 15158332, + "footer": { + "text": "Release Notification", + "icon_url": "https://example.com/failure-icon.png" + }, + "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" + }] + }' \ + ${{ secrets.DISCORD_WEBHOOK }} diff --git a/.github/workflows/release_insignia.yaml b/.github/workflows/release_insignia.yaml index af497b37..124d1e9c 100644 --- a/.github/workflows/release_insignia.yaml +++ b/.github/workflows/release_insignia.yaml @@ -1,9 +1,9 @@ name: release-dev run-name: release-dev ${{ github.actor }} on: - # push: - # tags: - # - "insignia-[0-9]+.[0-9]+.[0-9]+" + push: + tags: + - "insignia-[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: env: REGISTRY: docker.frappet.com diff --git a/.github/workflows/release_leave.yaml b/.github/workflows/release_leave.yaml index 9b5e0014..b017222d 100644 --- a/.github/workflows/release_leave.yaml +++ b/.github/workflows/release_leave.yaml @@ -1,9 +1,9 @@ name: release-dev run-name: release-dev ${{ github.actor }} on: - # push: - # tags: - # - "leave-[0-9]+.[0-9]+.[0-9]+" + push: + tags: + - "leave-[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: env: REGISTRY: docker.frappet.com @@ -57,7 +57,7 @@ jobs: push: true tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest - name: Remote Deployment - uses: appleboy/ssh-action@v1 + uses: appleboy/ssh-action@v0.1.8 with: host: ${{env.DEPLOY_HOST}} username: frappet diff --git a/.github/workflows/release_placement.yaml b/.github/workflows/release_placement.yaml index 377cbaf4..d9c2f266 100644 --- a/.github/workflows/release_placement.yaml +++ b/.github/workflows/release_placement.yaml @@ -1,9 +1,9 @@ name: release-dev run-name: release-dev ${{ github.actor }} on: - # push: - # tags: - # - "placement-[0-9]+.[0-9]+.[0-9]+" + push: + tags: + - "placement-[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: env: REGISTRY: docker.frappet.com diff --git a/.github/workflows/release_report.yaml b/.github/workflows/release_report.yaml index e529729b..9ba5a7c4 100644 --- a/.github/workflows/release_report.yaml +++ b/.github/workflows/release_report.yaml @@ -1,107 +1,107 @@ name: release-dev run-name: release-dev ${{ github.actor }} on: - # push: - # tags: - # - "reportv2-[0-9]+.[0-9]+.[0-9]+" + push: + tags: + - "reportv2-[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: env: - REGISTRY: docker.frappet.com - IMAGE_NAME: ehr/bma-ehr-report-v2-service - DEPLOY_HOST: frappet.com - DEPLOY_PORT: 10102 - # COMPOSE_PATH: /home/frappet/docker/bma-ehr - COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-report-v2 - TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 + REGISTRY: docker.frappet.com + IMAGE_NAME: ehr/bma-ehr-report-v2-service + DEPLOY_HOST: frappet.com + DEPLOY_PORT: 10102 + # COMPOSE_PATH: /home/frappet/docker/bma-ehr + COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-report-v2 + TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: - # act workflow_dispatch -W .github/workflows/release_report.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 - release-dev: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set output tags - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - name: Gen Version - id: gen_ver - run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - IMAGE_VER=${{ steps.vars.outputs.tag }} - else - IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} - fi - if [[ $IMAGE_VER == '' ]]; then - IMAGE_VER='test-vBeta' - fi - echo '::set-output name=image_ver::'$IMAGE_VER - - name: Check Version - run: | - echo $GITHUB_REF - echo ${{ steps.gen_ver.outputs.image_ver }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login in to registry - uses: docker/login-action@v2 - with: - registry: ${{env.REGISTRY}} - username: ${{secrets.DOCKER_USER}} - password: ${{secrets.DOCKER_PASS}} - - name: Build and load local docker image - uses: docker/build-push-action@v3 - with: - context: . - platforms: linux/amd64 - file: BMA.EHR.Report.Service/Dockerfile - push: true - tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest + # act workflow_dispatch -W .github/workflows/release_report.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 + release-dev: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set output tags + id: vars + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + - name: Gen Version + id: gen_ver + run: | + if [[ $GITHUB_REF == 'refs/tags/'* ]]; then + IMAGE_VER=${{ steps.vars.outputs.tag }} + else + IMAGE_VER=${{ github.event.inputs.IMAGE_VER }} + fi + if [[ $IMAGE_VER == '' ]]; then + IMAGE_VER='test-vBeta' + fi + echo '::set-output name=image_ver::'$IMAGE_VER + - name: Check Version + run: | + echo $GITHUB_REF + echo ${{ steps.gen_ver.outputs.image_ver }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login in to registry + uses: docker/login-action@v2 + with: + registry: ${{env.REGISTRY}} + username: ${{secrets.DOCKER_USER}} + password: ${{secrets.DOCKER_PASS}} + - name: Build and load local docker image + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + file: BMA.EHR.Report.Service/Dockerfile + push: true + tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest - - name: Reload docker compose - uses: appleboy/ssh-action@v0.1.8 - with: - host: ${{env.DEPLOY_HOST}} - username: frappet - password: ${{ secrets.SSH_PASSWORD }} - port: ${{env.DEPLOY_PORT}} - script: | - cd "${{env.COMPOSE_PATH}}" - docker compose pull - docker compose up -d - echo "${{ steps.gen_ver.outputs.image_ver }}"> success - - name: Notify Discord Success - if: success() - run: | - curl -H "Content-Type: application/json" \ - -X POST \ - -d '{ - "embeds": [{ - "title": "✅ Deployment Success!", - "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`", - "color": 3066993, - "footer": { - "text": "Release Notification", - "icon_url": "https://example.com/success-icon.png" - }, - "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" - }] - }' \ - ${{ secrets.DISCORD_WEBHOOK }} + - name: Reload docker compose + uses: appleboy/ssh-action@v0.1.8 + with: + host: ${{env.DEPLOY_HOST}} + username: frappet + password: ${{ secrets.SSH_PASSWORD }} + port: ${{env.DEPLOY_PORT}} + script: | + cd "${{env.COMPOSE_PATH}}" + docker compose pull + docker compose up -d + echo "${{ steps.gen_ver.outputs.image_ver }}"> success + - name: Notify Discord Success + if: success() + run: | + curl -H "Content-Type: application/json" \ + -X POST \ + -d '{ + "embeds": [{ + "title": "✅ Deployment Success!", + "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`", + "color": 3066993, + "footer": { + "text": "Release Notification", + "icon_url": "https://example.com/success-icon.png" + }, + "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" + }] + }' \ + ${{ secrets.DISCORD_WEBHOOK }} - - name: Notify Discord Failure - if: failure() - run: | - curl -H "Content-Type: application/json" \ - -X POST \ - -d '{ - "embeds": [{ - "title": "❌ Deployment Failed!", - "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`", - "color": 15158332, - "footer": { - "text": "Release Notification", - "icon_url": "https://example.com/failure-icon.png" - }, - "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" - }] - }' \ - ${{ secrets.DISCORD_WEBHOOK }} + - name: Notify Discord Failure + if: failure() + run: | + curl -H "Content-Type: application/json" \ + -X POST \ + -d '{ + "embeds": [{ + "title": "❌ Deployment Failed!", + "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`", + "color": 15158332, + "footer": { + "text": "Release Notification", + "icon_url": "https://example.com/failure-icon.png" + }, + "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" + }] + }' \ + ${{ secrets.DISCORD_WEBHOOK }} diff --git a/.gitignore b/.gitignore index f60d8ec1..88bfb4ba 100644 --- a/.gitignore +++ b/.gitignore @@ -16,19 +16,6 @@ # Mono auto generated files mono_crash.* -# JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -.idea/ -*.iml -*.ipr -*.iws -out/ -.idea_modules/ -atlassian-ide-plugin.xml -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - # Build results [Dd]ebug/ [Dd]ebugPublic/ @@ -373,10 +360,4 @@ MigrationBackup/ .ionide/ # Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code C# Dev Kit cache -*.lscache - -# Claude Code -.claude/ \ No newline at end of file +FodyWeavers.xsd \ No newline at end of file diff --git a/.idea/.idea.BMA.EHR.Solution/.idea/.name b/.idea/.idea.BMA.EHR.Solution/.idea/.name new file mode 100644 index 00000000..888d8763 --- /dev/null +++ b/.idea/.idea.BMA.EHR.Solution/.idea/.name @@ -0,0 +1 @@ +BMA.EHR.Solution \ No newline at end of file diff --git a/.idea/.idea.BMA.EHR.Solution/.idea/encodings.xml b/.idea/.idea.BMA.EHR.Solution/.idea/encodings.xml new file mode 100644 index 00000000..df87cf95 --- /dev/null +++ b/.idea/.idea.BMA.EHR.Solution/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.BMA.EHR.Solution/.idea/indexLayout.xml b/.idea/.idea.BMA.EHR.Solution/.idea/indexLayout.xml new file mode 100644 index 00000000..7b08163c --- /dev/null +++ b/.idea/.idea.BMA.EHR.Solution/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.BMA.EHR.Solution/.idea/projectSettingsUpdater.xml b/.idea/.idea.BMA.EHR.Solution/.idea/projectSettingsUpdater.xml new file mode 100644 index 00000000..4bb9f4d2 --- /dev/null +++ b/.idea/.idea.BMA.EHR.Solution/.idea/projectSettingsUpdater.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/.idea.BMA.EHR.Solution/.idea/vcs.xml b/.idea/.idea.BMA.EHR.Solution/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/.idea.BMA.EHR.Solution/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/.idea.BMA.EHR.Solution/.idea/workspace.xml b/.idea/.idea.BMA.EHR.Solution/.idea/workspace.xml new file mode 100644 index 00000000..3a284eaf --- /dev/null +++ b/.idea/.idea.BMA.EHR.Solution/.idea/workspace.xml @@ -0,0 +1,552 @@ + + + + BMA.EHR.CheckInConsumer/BMA.EHR.CheckInConsumer.csproj + BMA.EHR.CheckInConsumer/BMA.EHR.CheckInConsumer.csproj + BMA.EHR.Command.Service/BMA.EHR.Command.Service.csproj + BMA.EHR.Command.Service/BMA.EHR.Command.Service.csproj + BMA.EHR.Command.Service/BMA.EHR.Command.Service.csproj + BMA.EHR.Discipline.Service/BMA.EHR.Discipline.Service.csproj + BMA.EHR.Discipline.Service/BMA.EHR.Discipline.Service.csproj + BMA.EHR.Insignia/BMA.EHR.Insignia.csproj + BMA.EHR.Insignia/BMA.EHR.Insignia.csproj + BMA.EHR.Insignia/BMA.EHR.Insignia.csproj + BMA.EHR.Leave/BMA.EHR.Leave.csproj + BMA.EHR.Leave/BMA.EHR.Leave.csproj + BMA.EHR.Leave/BMA.EHR.Leave.csproj + BMA.EHR.MetaData.Service/BMA.EHR.MetaData.Service.csproj + BMA.EHR.MetaData.Service/BMA.EHR.MetaData.Service.csproj + BMA.EHR.MetaData.Service/BMA.EHR.MetaData.Service.csproj + BMA.EHR.OrganizationEmployee.Service/BMA.EHR.OrganizationEmployee.Service.csproj + BMA.EHR.OrganizationEmployee.Service/BMA.EHR.OrganizationEmployee.Service.csproj + BMA.EHR.OrganizationEmployee.Service/BMA.EHR.OrganizationEmployee.Service.csproj + BMA.EHR.Placement.Service/BMA.EHR.Placement.Service.csproj + BMA.EHR.Placement.Service/BMA.EHR.Placement.Service.csproj + BMA.EHR.Placement.Service/BMA.EHR.Placement.Service.csproj + BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj + BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj + BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj + BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj + BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj + BMA.EHR.Retirement.Service/BMA.EHR.Retirement.Service.csproj + BMA.EHR.Retirement.Service/BMA.EHR.Retirement.Service.csproj + BMA.EHR.Retirement.Service/BMA.EHR.Retirement.Service.csproj + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1724638841465 + + + + + + + + + + + + + file://$PROJECT_DIR$/BMA.EHR.Leave/Controllers/LeaveController.cs + 1152 + + + + + + + + + + + \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 6be3e592..fd9cf53a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,60 +1,35 @@ { - "version": "0.2.0", - "configurations": [ - { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md. - "name": ".NET Core Launch (web)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/BMA.EHR.Leave/bin/Debug/net7.0/BMA.EHR.Leave.dll", - "args": [], - "cwd": "${workspaceFolder}/BMA.EHR.Leave", - "stopAtEntry": false, - // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser - "serverReadyAction": { - "action": "openExternally", - "pattern": "\\bNow listening on:\\s+(https?://\\S+)" - }, - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "sourceFileMap": { - "/Views": "${workspaceFolder}/Views" - } - }, - { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md. - "name": ".NET Core Launch (web) - Insignia", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/BMA.EHR.Insignia/bin/Debug/net7.0/BMA.EHR.Insignia.dll", - "args": [], - "cwd": "${workspaceFolder}/BMA.EHR.Insignia", - "stopAtEntry": false, - // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser - "serverReadyAction": { - "action": "openExternally", - "pattern": "\\bNow listening on:\\s+(https?://\\S+)" - }, - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "sourceFileMap": { - "/Views": "${workspaceFolder}/Views" - } - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach" - } - ] -} + "version": "0.2.0", + "configurations": [ + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md. + "name": ".NET Core Launch (web)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/BMA.EHR.Leave.Service/bin/Debug/net7.0/BMA.EHR.Leave.Service.dll", + "args": [], + "cwd": "${workspaceFolder}/BMA.EHR.Leave.Service", + "stopAtEntry": false, + // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser + "serverReadyAction": { + "action": "openExternally", + "pattern": "\\bNow listening on:\\s+(https?://\\S+)" + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/Views" + } + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/BMA.EHR.Application/ApplicationServicesRegistration.cs b/BMA.EHR.Application/ApplicationServicesRegistration.cs index 0b99a7b6..312a2597 100644 --- a/BMA.EHR.Application/ApplicationServicesRegistration.cs +++ b/BMA.EHR.Application/ApplicationServicesRegistration.cs @@ -23,7 +23,6 @@ namespace BMA.EHR.Application services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); @@ -53,16 +52,12 @@ namespace BMA.EHR.Application services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); services.AddTransient(); - services.AddTransient(); - return services; } diff --git a/BMA.EHR.Application/BMA.EHR.Application.csproj b/BMA.EHR.Application/BMA.EHR.Application.csproj index 7a12c4b5..b3262e4b 100644 --- a/BMA.EHR.Application/BMA.EHR.Application.csproj +++ b/BMA.EHR.Application/BMA.EHR.Application.csproj @@ -4,9 +4,6 @@ net6.0 enable enable - false - $(NoWarn);$(WarningsNotAsErrors) - diff --git a/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs index 7db52edd..75f98dd4 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs @@ -99,11 +99,11 @@ namespace BMA.EHR.Application.Repositories.Commands PositionLevel = p.posLevelName == null ? "" : p.posLevelName, PositionType = p.posTypeName == null ? "" : p.posTypeName, PositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", Salary = p.Amount == null ? "0" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), ExamNumber = p.ExamNumber == null ? "0" : p.ExamNumber.Value.ToString().ToThaiNumber(), @@ -152,11 +152,11 @@ namespace BMA.EHR.Application.Repositories.Commands PositionLevel = p.posLevelName == null ? "" : p.posLevelName, PositionType = p.posTypeName == null ? "" : p.posTypeName, PositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", Salary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), ExamNumber = p.ExamNumber == null ? "" : p.ExamNumber.Value.ToString().ToThaiNumber(), @@ -206,11 +206,11 @@ namespace BMA.EHR.Application.Repositories.Commands OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld, OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld, OldPositionNumber = p.posMasterNoOld == null ? "" : - p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "", + p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "", OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), NewOc = p.root == null ? "" : p.root, @@ -218,11 +218,11 @@ namespace BMA.EHR.Application.Repositories.Commands NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName, NewPositionType = p.posTypeName == null ? "" : p.posTypeName, NewPositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), RemarkHorizontal = p.RemarkHorizontal, @@ -269,22 +269,22 @@ namespace BMA.EHR.Application.Repositories.Commands OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld, OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld, OldPositionNumber = p.posMasterNoOld == null ? "" : - p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "", + p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "", OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), NewOc = p.root == null ? "" : p.root, NewPositionName = p.positionName == null ? "" : p.positionName, NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName, NewPositionType = p.posTypeName == null ? "" : p.posTypeName, NewPositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber() }) @@ -329,22 +329,22 @@ namespace BMA.EHR.Application.Repositories.Commands OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld, OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld, OldPositionNumber = p.posMasterNoOld == null ? "" : - p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "", + p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "", OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), NewOc = p.root == null ? "" : p.root, NewPositionName = p.positionName == null ? "" : p.positionName, NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName, NewPositionType = p.posTypeName == null ? "" : p.posTypeName, NewPositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber() }) @@ -407,11 +407,11 @@ namespace BMA.EHR.Application.Repositories.Commands NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName, NewPositionType = p.posTypeName == null ? "" : p.posTypeName, NewPositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), Reason = p.Reason == null ? "-" : p.Reason, @@ -477,11 +477,11 @@ namespace BMA.EHR.Application.Repositories.Commands NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName, NewPositionType = p.posTypeName == null ? "" : p.posTypeName, NewPositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), Reason = p.Reason == null ? "-" : p.Reason, @@ -750,11 +750,11 @@ namespace BMA.EHR.Application.Repositories.Commands NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName, NewPositionType = p.posTypeName == null ? "" : p.posTypeName, NewPositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), Reason = p.Reason == null ? "-" : p.Reason, @@ -1173,11 +1173,11 @@ namespace BMA.EHR.Application.Repositories.Commands NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName.ToThaiNumber(), // NewPositionType = p.posTypeName == null ? "" : p.posTypeName, NewPositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), Reason = p.Reason == null ? "-" : p.Reason, }) @@ -1307,11 +1307,11 @@ namespace BMA.EHR.Application.Repositories.Commands NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName, // NewPositionType = p.posTypeName == null ? "" : p.posTypeName, NewPositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), Reason = p.Reason == null ? "-" : p.Reason, }) diff --git a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs index d306b3e9..52e1a517 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs @@ -919,7 +919,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -934,7 +934,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -986,7 +986,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -1001,7 +1001,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -1423,7 +1423,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -1440,7 +1440,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -1534,7 +1534,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -1550,7 +1550,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -1603,7 +1603,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -1832,7 +1832,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -1849,7 +1849,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -1905,7 +1905,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -1922,7 +1922,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -1978,7 +1978,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -1995,7 +1995,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -2051,7 +2051,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2068,7 +2068,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -2124,7 +2124,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2141,7 +2141,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -2197,7 +2197,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2214,7 +2214,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -2270,7 +2270,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2287,7 +2287,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -2340,7 +2340,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2355,7 +2355,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var _client = new HttpClient()) { _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -2409,7 +2409,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2462,7 +2462,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2515,7 +2515,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2568,7 +2568,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2621,7 +2621,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2673,7 +2673,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2725,7 +2725,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -2994,7 +2994,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -3046,7 +3046,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); foreach (var edu in placementProfile.PlacementEducations) { var _res = await client.PostAsJsonAsync(apiUrlEdu, new @@ -3083,7 +3083,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); foreach (var cer in placementProfile.PlacementCertificates) { var _res = await client.PostAsJsonAsync(apiUrlCer, new @@ -3104,7 +3104,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { profileId = profileId, @@ -3113,11 +3113,11 @@ namespace BMA.EHR.Application.Repositories.Commands positionSalaryAmount = placementProfile.PositionSalaryAmount, mouthSalaryAmount = placementProfile.MouthSalaryAmount, posNo = placementProfile.posMasterNo == null ? "" : - placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "", + placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "", position = placementProfile.positionName == null ? string.Empty : placementProfile.positionName, positionLine = string.Empty, positionPathSide = string.Empty, @@ -3135,7 +3135,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlOrg); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { @@ -3287,7 +3287,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -3297,11 +3297,11 @@ namespace BMA.EHR.Application.Repositories.Commands positionSalaryAmount = recv.PositionSalaryAmount, mouthSalaryAmount = recv.MouthSalaryAmount, posNo = placementProfile.posMasterNo == null ? "" : - placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "", + placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "", position = placementProfile.positionName, positionLine = "", positionPathSide = "", @@ -3319,7 +3319,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlOrg); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { @@ -3468,7 +3468,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -3478,11 +3478,11 @@ namespace BMA.EHR.Application.Repositories.Commands positionSalaryAmount = recv.PositionSalaryAmount, mouthSalaryAmount = recv.MouthSalaryAmount, posNo = placementProfile.posMasterNo == null ? "" : - placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "", + placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "", position = placementProfile.positionName, positionLine = "", positionPathSide = "", @@ -3500,7 +3500,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlOrg); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { @@ -3649,7 +3649,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -3659,11 +3659,11 @@ namespace BMA.EHR.Application.Repositories.Commands positionSalaryAmount = recv.PositionSalaryAmount, mouthSalaryAmount = recv.MouthSalaryAmount, posNo = placementProfile.posMasterNo == null ? "" : - placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "", + placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "", position = placementProfile.positionName, positionLine = "", positionPathSide = "", @@ -3681,7 +3681,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlOrg); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { @@ -3832,7 +3832,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -3842,11 +3842,11 @@ namespace BMA.EHR.Application.Repositories.Commands positionSalaryAmount = recv.PositionSalaryAmount, mouthSalaryAmount = recv.MouthSalaryAmount, posNo = placementProfile.posMasterNo == null ? "" : - placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "", + placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "", position = placementProfile.position, positionLine = "", positionPathSide = "", @@ -3864,7 +3864,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlOrg); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { @@ -4017,7 +4017,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -4027,11 +4027,11 @@ namespace BMA.EHR.Application.Repositories.Commands positionSalaryAmount = recv.PositionSalaryAmount, mouthSalaryAmount = recv.MouthSalaryAmount, posNo = placementProfile.posMasterNo == null ? "" : - placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "", + placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "", position = placementProfile.position, positionLine = "", positionPathSide = "", @@ -4049,7 +4049,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlOrg); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { @@ -4199,7 +4199,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -4209,11 +4209,11 @@ namespace BMA.EHR.Application.Repositories.Commands positionSalaryAmount = recv.PositionSalaryAmount, mouthSalaryAmount = recv.MouthSalaryAmount, posNo = placementProfile.posMasterNo == null ? "" : - placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "", + placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "", position = placementProfile.position, positionLine = "", positionPathSide = "", @@ -4231,7 +4231,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlOrg); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { @@ -4382,7 +4382,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -4409,7 +4409,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlLeave); string? _null = null; var _res = await client.PostAsJsonAsync(apiUrlLeave, new @@ -4560,7 +4560,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -4587,7 +4587,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlLeave); string? _null = null; var _res = await client.PostAsJsonAsync(apiUrlLeave, new @@ -4928,7 +4928,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -5085,7 +5085,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -5262,7 +5262,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -5440,7 +5440,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -5450,11 +5450,11 @@ namespace BMA.EHR.Application.Repositories.Commands positionSalaryAmount = recv.PositionSalaryAmount, mouthSalaryAmount = recv.MouthSalaryAmount, posNo = placementProfile.posMasterNo == null ? "" : - placementProfile.node == 4 ? $"{placementProfile.child4ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 3 ? $"{placementProfile.child3ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 2 ? $"{placementProfile.child2ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 1 ? $"{placementProfile.child1ShortName} {placementProfile.posMasterNo}" : - placementProfile.node == 0 ? $"{placementProfile.rootShortName} {placementProfile.posMasterNo}" : "", + placementProfile.node == 4 ? $"{placementProfile.child4ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 3 ? $"{placementProfile.child3ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 2 ? $"{placementProfile.child2ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 1 ? $"{placementProfile.child1ShortName}{placementProfile.posMasterNo}" : + placementProfile.node == 0 ? $"{placementProfile.rootShortName}{placementProfile.posMasterNo}" : "", position = placementProfile.position, positionLine = "", positionPathSide = "", @@ -5472,7 +5472,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlOrg); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { @@ -5626,7 +5626,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -5805,7 +5805,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -5986,7 +5986,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -6001,7 +6001,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -6182,7 +6182,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -6197,7 +6197,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -6371,7 +6371,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -6452,7 +6452,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, _apiUrl); var res = await client.PostAsJsonAsync(_apiUrl, new { result = dataSend }); var result = await res.Content.ReadAsStringAsync(); @@ -6549,7 +6549,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -6630,7 +6630,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, _apiUrl); var res = await client.PostAsJsonAsync(_apiUrl, new { result = dataSend }); var result = await res.Content.ReadAsStringAsync(); @@ -6719,7 +6719,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -6877,7 +6877,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -6887,11 +6887,11 @@ namespace BMA.EHR.Application.Repositories.Commands positionSalaryAmount = recv.PositionSalaryAmount, mouthSalaryAmount = recv.MouthSalaryAmount, posNo = data.posMasterNo == null ? "" : - data.node == 4 ? $"{data.child4ShortName} {data.posMasterNo}" : - data.node == 3 ? $"{data.child3ShortName} {data.posMasterNo}" : - data.node == 2 ? $"{data.child2ShortName} {data.posMasterNo}" : - data.node == 1 ? $"{data.child1ShortName} {data.posMasterNo}" : - data.node == 0 ? $"{data.rootShortName} {data.posMasterNo}" : "", + data.node == 4 ? $"{data.child4ShortName}{data.posMasterNo}" : + data.node == 3 ? $"{data.child3ShortName}{data.posMasterNo}" : + data.node == 2 ? $"{data.child2ShortName}{data.posMasterNo}" : + data.node == 1 ? $"{data.child1ShortName}{data.posMasterNo}" : + data.node == 0 ? $"{data.rootShortName}{data.posMasterNo}" : "", position = data.position, positionType = data.posTypeName, positionLevel = data.posLevelName, @@ -6906,7 +6906,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlOrg); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { @@ -7062,7 +7062,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Put, apiUrl); var _res = await client.PutAsJsonAsync(apiUrl, new { @@ -7215,7 +7215,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -7225,11 +7225,11 @@ namespace BMA.EHR.Application.Repositories.Commands positionSalaryAmount = recv.PositionSalaryAmount, mouthSalaryAmount = recv.MouthSalaryAmount, posNo = data.posMasterNo == null ? "" : - data.node == 4 ? $"{data.child4ShortName} {data.posMasterNo}" : - data.node == 3 ? $"{data.child3ShortName} {data.posMasterNo}" : - data.node == 2 ? $"{data.child2ShortName} {data.posMasterNo}" : - data.node == 1 ? $"{data.child1ShortName} {data.posMasterNo}" : - data.node == 0 ? $"{data.rootShortName} {data.posMasterNo}" : "", + data.node == 4 ? $"{data.child4ShortName}{data.posMasterNo}" : + data.node == 3 ? $"{data.child3ShortName}{data.posMasterNo}" : + data.node == 2 ? $"{data.child2ShortName}{data.posMasterNo}" : + data.node == 1 ? $"{data.child1ShortName}{data.posMasterNo}" : + data.node == 0 ? $"{data.rootShortName}{data.posMasterNo}" : "", position = data.position, positionType = data.posTypeName, positionLevel = data.posLevelName, @@ -7244,7 +7244,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlOrg); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { @@ -7385,7 +7385,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -7411,7 +7411,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl2); var _res = await client.PostAsJsonAsync(apiUrl2, new { @@ -7544,7 +7544,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -7570,7 +7570,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl2); var _res = await client.PostAsJsonAsync(apiUrl2, new { @@ -7704,7 +7704,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -7730,7 +7730,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl2); var _res = await client.PostAsJsonAsync(apiUrl2, new { @@ -7864,7 +7864,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -7890,7 +7890,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl2); var _res = await client.PostAsJsonAsync(apiUrl2, new { @@ -8024,7 +8024,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -8050,7 +8050,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl2); var _res = await client.PostAsJsonAsync(apiUrl2, new { @@ -8184,7 +8184,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -8210,7 +8210,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl2); var _res = await client.PostAsJsonAsync(apiUrl2, new { @@ -8344,7 +8344,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -8370,7 +8370,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl2); var _res = await client.PostAsJsonAsync(apiUrl2, new { @@ -8504,7 +8504,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -8530,7 +8530,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl2); var _res = await client.PostAsJsonAsync(apiUrl2, new { @@ -8663,7 +8663,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -8806,7 +8806,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -8949,7 +8949,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -9091,7 +9091,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -9234,7 +9234,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var res = await client.PostAsJsonAsync(apiUrl, new { result = data }); var result = await res.Content.ReadAsStringAsync(); @@ -9612,7 +9612,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); string? _null = null; var _res = await client.PostAsJsonAsync(apiUrl, new @@ -9628,7 +9628,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlSalary); var _res = await client.PostAsJsonAsync(apiUrlSalary, new { @@ -11388,7 +11388,7 @@ namespace BMA.EHR.Application.Repositories.Commands using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); foreach (var insignia in Insignias) { var _res = await client.PostAsJsonAsync(apiUrlInsig, new diff --git a/BMA.EHR.Application/Repositories/DisciplineRepository.cs b/BMA.EHR.Application/Repositories/DisciplineRepository.cs index 1933a2ce..2f4461e8 100644 --- a/BMA.EHR.Application/Repositories/DisciplineRepository.cs +++ b/BMA.EHR.Application/Repositories/DisciplineRepository.cs @@ -49,7 +49,7 @@ namespace BMA.EHR.Application.Repositories using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = cronjobNoti.DisciplineComplaint_Profiles.Select(x => x.PersonId), @@ -91,7 +91,7 @@ namespace BMA.EHR.Application.Repositories using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = cronjobNoti.DisciplineInvestigate_ProfileComplaints.Select(x => x.PersonId), @@ -132,7 +132,7 @@ namespace BMA.EHR.Application.Repositories using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = cronjobNoti.DisciplineDisciplinary_ProfileComplaintInvestigates.Select(x => x.PersonId), diff --git a/BMA.EHR.Application/Repositories/GenericRepository.cs b/BMA.EHR.Application/Repositories/GenericRepository.cs index d825ccaf..1d562581 100644 --- a/BMA.EHR.Application/Repositories/GenericRepository.cs +++ b/BMA.EHR.Application/Repositories/GenericRepository.cs @@ -1,16 +1,15 @@ -using Amazon.Runtime.Internal.Endpoints.StandardLibrary; -using Amazon.S3.Model.Internal.MarshallTransformations; +using Amazon.S3.Model.Internal.MarshallTransformations; using BMA.EHR.Application.Common.Interfaces; using BMA.EHR.Domain.Models.Base; using BMA.EHR.Domain.Models.HR; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Newtonsoft.Json; using System.Net.Http.Headers; using System.Security.Claims; using System.Text; +using Microsoft.Extensions.Configuration; namespace BMA.EHR.Application.Repositories { @@ -53,18 +52,15 @@ namespace BMA.EHR.Application.Repositories #region " For Call External API " - protected async Task GetExternalAPIAsync(string apiPath, string accessToken, string apiKey, CancellationToken cancellationToken = default) + protected async Task GetExternalAPIAsync(string apiPath, string accessToken, string apiKey) { try { - // กำหนด timeout เป็น 30 นาที - using var timeoutCts = new CancellationTokenSource(TimeSpan.FromMinutes(30)); - using var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token); using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", apiKey); - var _res = await client.GetAsync(apiPath,cancellationToken: combinedCts.Token); + client.DefaultRequestHeaders.Add("api_key", apiKey); + var _res = await client.GetAsync(apiPath); if (_res.IsSuccessStatusCode) { var _result = await _res.Content.ReadAsStringAsync(); @@ -80,79 +76,10 @@ namespace BMA.EHR.Application.Repositories } } - protected async Task SendExternalAPIAsync(HttpMethod method, string apiPath, string accessToken, object? body, string apiKey, CancellationToken cancellationToken = default) + protected async Task PostExternalAPIAsync(string apiPath, string accessToken, object? body, string apiKey) { try { - // กำหนด timeout เป็น 30 นาที - using var timeoutCts = new CancellationTokenSource(TimeSpan.FromMinutes(30)); - using var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token); - // สร้าง request message - var request = new HttpRequestMessage(method, apiPath); - - - var json = JsonConvert.SerializeObject(body); - request.Content = new StringContent(json, Encoding.UTF8, "application/json"); - - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", apiKey); - var _res = await client.SendAsync(request, combinedCts.Token); - if (_res.IsSuccessStatusCode) - { - var _result = await _res.Content.ReadAsStringAsync(); - - return _result; - } - return string.Empty; - } - } - catch - { - throw; - } - } - - - public async Task PostExternalAPIAsync(string apiPath, string accessToken, object? body, string apiKey, CancellationToken cancellationToken = default) - { - try - { - // กำหนด timeout เป็น 30 นาที - using var timeoutCts = new CancellationTokenSource(TimeSpan.FromMinutes(30)); - using var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token); - var json = JsonConvert.SerializeObject(body); - var stringContent = new StringContent(json, Encoding.UTF8, "application/json"); - //stringContent.Headers.ContentType = new MediaTypeHeaderValue("application/json"); - - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", apiKey); - var _res = await client.PostAsync(apiPath, stringContent, combinedCts.Token); - if (_res.IsSuccessStatusCode) - { - var _result = await _res.Content.ReadAsStringAsync(); - - return _result; - } - return string.Empty; - } - } - catch - { - throw; - } - } - - protected async Task PostExternalAPIBooleanAsync(string apiPath, string accessToken, object? body, string apiKey, CancellationToken cancellationToken = default) - { - try - { - // กำหนด timeout เป็น 30 นาที - using var timeoutCts = new CancellationTokenSource(TimeSpan.FromMinutes(30)); - using var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token); var json = JsonConvert.SerializeObject(body); var stringContent = new StringContent(json, UnicodeEncoding.UTF8, "application/json"); stringContent.Headers.ContentType = new MediaTypeHeaderValue("application/json"); @@ -160,8 +87,36 @@ namespace BMA.EHR.Application.Repositories using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", apiKey); - var _res = await client.PostAsync(apiPath, stringContent, combinedCts.Token); + client.DefaultRequestHeaders.Add("api_key", apiKey); + var _res = await client.PostAsync(apiPath, stringContent); + if (_res.IsSuccessStatusCode) + { + var _result = await _res.Content.ReadAsStringAsync(); + + return _result; + } + return string.Empty; + } + } + catch + { + throw; + } + } + + protected async Task PostExternalAPIBooleanAsync(string apiPath, string accessToken, object? body, string apiKey) + { + try + { + var json = JsonConvert.SerializeObject(body); + var stringContent = new StringContent(json, UnicodeEncoding.UTF8, "application/json"); + stringContent.Headers.ContentType = new MediaTypeHeaderValue("application/json"); + + using (var client = new HttpClient()) + { + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", apiKey); + var _res = await client.PostAsync(apiPath, stringContent); return _res.IsSuccessStatusCode; } } diff --git a/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs b/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs index 1c0741cb..f11ba201 100644 --- a/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs +++ b/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs @@ -1,19 +1,16 @@ -using Amazon.S3.Model.Internal.MarshallTransformations; using BMA.EHR.Application.Common.Interfaces; using BMA.EHR.Application.Requests; -using BMA.EHR.Application.Responses.Profiles; -using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Models.Insignias; using BMA.EHR.Domain.Models.MetaData; using BMA.EHR.Domain.Models.OrganizationEmployee; -using BMA.EHR.Domain.Models.Organizations; using BMA.EHR.Domain.Shared; -using GreatFriends.ThaiBahtText; +using BMA.EHR.Domain.Extensions; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -using Nest; using Newtonsoft.Json; +using BMA.EHR.Domain.Models.Organizations; +using Amazon.S3.Model.Internal.MarshallTransformations; +using BMA.EHR.Application.Responses.Profiles; using ProfileInsignia = BMA.EHR.Domain.Models.HR.ProfileInsignia; namespace BMA.EHR.Application.Repositories @@ -151,17 +148,6 @@ namespace BMA.EHR.Application.Repositories } } - private static bool IsHigherLevel(BMA.EHR.Application.Responses.Profiles.ProfileInsignia? last, string request) - { - if (last == null) - return true; - else - { - var last_ins = last.Insignia?.ToLower().Trim() ?? ""; - return IsHigherLevel(last_ins, request); - } - } - private static bool IsHigherLevel(string last, string request) { if (request.Contains("ตริตาภรณ์ช้างเผือก")) @@ -280,8 +266,8 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix ?? "")}{p.FirstName} {p.LastName}", Position = p.Position ?? "", Rank = p.PosLevel ?? "", - ProfileDateAppoint = p.DateAppoint!.Value, - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), PosNo = p.PosNo, PositionLevelId = p.PosLevelId, PositionLevelName = p.PosLevel, @@ -297,13 +283,12 @@ namespace BMA.EHR.Application.Repositories : p.ProfileInsignia!.OrderByDescending(x => x.Year).FirstOrDefault()!.InsigniaId.Value, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PositionSalaryAmount = p.PositionSalaryAmount ?? 0, - ProfileInsignia = p.ProfileInsignia, Amount = p.Amount ?? 0, RootId = p.RootId, RootDnaId = p.RootDnaId, @@ -320,12 +305,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }); // check วันที่บรรจะต้องน้อยกว่า 29/5/ปี-8 ขอ บม. @@ -389,13 +368,7 @@ namespace BMA.EHR.Application.Repositories $"2.ได้รับอัตราค่าจ้างตั้งแต่อัตราเงินเดือนขั้นต่ำของข้าราขการพลเรือนระดับปฏิบัติการ (8,340) แต่ไม่ถึงขั้นต่ำของอัตราเงินเดือนข้าราชการพลเรือนระดับชำนาญการ (15,050)", Result = $"อัตราค่าจ้าง {p?.SalaryCondition?.ToString("#,##0")??""}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } })).ToList(); var bcpRoyal = await _dbContext.Set() @@ -406,85 +379,76 @@ namespace BMA.EHR.Application.Repositories var jtmRoyal = await _dbContext.Set() .FirstOrDefaultAsync(x => x.Name.Contains("จัตุรถาภรณ์มงกุฎไทย")); - var s2_a = (from p in allProfilesByRoot - where p.ProfileInsignia != null - && p.ProfileInsignia.Count > 0 - && (p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != coinInsignia.Id && - x.InsigniaId.Value == bcpRoyal.Id) - .ToList() - .Count() == 0) - select new - { - ProfileId = p.Id, - p.CitizenId, - p.FirstName, - p.LastName, - p.BirthDate, - p.DateAppoint, - Prefix = p.Prefix ?? "", - FullName = $"{(p.Prefix ?? "")}{p.FirstName} {p.LastName}", - Position = p.Position ?? "", - Rank = p.PosLevel ?? "", - ProfileDateAppoint = p.DateAppoint!.Value, - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - PosNo = p.PosNo, - PositionLevelId = p.PosLevelId, - PositionLevelName = p.PosLevel, - PositionTypeId = p.PosTypeId, - PositionTypeName = p.PosType, - Gender = p.Gender ?? "", - PositionSalaryAmount = p.PositionSalaryAmount ?? 0, - Amount = p.Amount ?? 0, - RootId = p.RootId, - RootDnaId = p.RootDnaId, - Root = p.Root, - Child1Id = p.Child1Id, - Child1DnaId = p.Child1DnaId, - Child1 = p.Child1, - Child2Id = p.Child2Id, - Child2DnaId = p.Child2DnaId, - Child2 = p.Child2, - Child3Id = p.Child3Id, - Child3DnaId = p.Child3DnaId, - Child3 = p.Child3, - Child4Id = p.Child4Id, - Child4DnaId = p.Child4DnaId, - Child4 = p.Child4, - LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 - ? null - : p.ProfileInsignia!.OrderByDescending(x => x.Year).FirstOrDefault()! - .Insignia, - LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 - ? Guid.Parse("00000000-0000-0000-0000-000000000000") - : p.ProfileInsignia!.OrderByDescending(x => x.Year).FirstOrDefault()!.InsigniaId.Value, - Salary = p.Amount, - SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : - p.Amount, - IsHigherLevel = - IsHigherLevel(p.ProfileInsignia.ToList() - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != coinInsignia.Id) - .OrderByDescending(x => x.Year) - .FirstOrDefault(), - "เบญจมาภรณ์ช้างเผือก"), - FirstRecvInsigniaYear = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == bcmRoyal.Id).OrderBy(x => x.Year) - .FirstOrDefault() == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == bcmRoyal.Id).OrderBy(x => x.Year) - .FirstOrDefault()?.Year, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate - }) - .ToList(); - - var s2 = s2_a + var s2 = (from p in allProfilesByRoot + where p.ProfileInsignia != null + && p.ProfileInsignia.Count > 0 + && (p.ProfileInsignia.Where(x => x.InsigniaId.Value != coinInsignia.Id && + x.InsigniaId.Value == bcpRoyal.Id) + .ToList() + .Count() == 0) + select new + { + ProfileId = p.Id, + p.CitizenId, + p.FirstName, + p.LastName, + p.BirthDate, + p.DateAppoint, + Prefix = p.Prefix ?? "", + FullName = $"{(p.Prefix ?? "")}{p.FirstName} {p.LastName}", + Position = p.Position ?? "", + Rank = p.PosLevel ?? "", + ProfileDateAppoint = p.DateAppoint.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + PosNo = p.PosNo, + PositionLevelId = p.PosLevelId, + PositionLevelName = p.PosLevel, + PositionTypeId = p.PosTypeId, + PositionTypeName = p.PosType, + Gender = p.Gender ?? "", + PositionSalaryAmount = p.PositionSalaryAmount ?? 0, + Amount = p.Amount ?? 0, + RootId = p.RootId, + RootDnaId = p.RootDnaId, + Root = p.Root, + Child1Id = p.Child1Id, + Child1DnaId = p.Child1DnaId, + Child1 = p.Child1, + Child2Id = p.Child2Id, + Child2DnaId = p.Child2DnaId, + Child2 = p.Child2, + Child3Id = p.Child3Id, + Child3DnaId = p.Child3DnaId, + Child3 = p.Child3, + Child4Id = p.Child4Id, + Child4DnaId = p.Child4DnaId, + Child4 = p.Child4, + LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 + ? null + : p.ProfileInsignia!.OrderByDescending(x => x.Year).FirstOrDefault()! + .Insignia, + LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 + ? Guid.Parse("00000000-0000-0000-0000-000000000000") + : p.ProfileInsignia!.OrderByDescending(x => x.Year).FirstOrDefault()!.InsigniaId.Value, + Salary = p.Amount, + SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : + p.Amount, + IsHigherLevel = IsHigherLevel(p.ProfileInsignia.ToList() + .Where(x => x.InsigniaId.Value != coinInsignia.Id) + .OrderByDescending(x => x.Year) + .FirstOrDefault().Insignia, + "เบญจมาภรณ์ช้างเผือก"), + FirstRecvInsigniaYear = p.ProfileInsignia == null ? 0 : + p.ProfileInsignia.Where(x => x.InsigniaId.Value == bcmRoyal.Id).OrderBy(x => x.Year) + .FirstOrDefault() == null ? 0 : + p.ProfileInsignia.Where(x => x.InsigniaId.Value == bcmRoyal.Id).OrderBy(x => x.Year) + .FirstOrDefault().Year, + }) + .ToList() .Where(x => (x.SalaryCondition >= 8340 && x.SalaryCondition < 10150) && !x.IsHigherLevel) .Where(x => x.FirstRecvInsigniaYear != 0 && x.FirstRecvInsigniaYear <= period.Year - 5) .Select(p => new InsigniaResultSet @@ -541,13 +505,7 @@ namespace BMA.EHR.Application.Repositories $"2.ได้ บ.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้รับ บ.ม. ก่อนวันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()})", Result = $"ได้รับ บ.ม. ในปี {p.FirstRecvInsigniaYear}" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -555,7 +513,7 @@ namespace BMA.EHR.Application.Repositories var s3 = (from p in allProfilesByRoot where p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 - && (p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != coinInsignia.Id && + && (p.ProfileInsignia.Where(x => x.InsigniaId.Value != coinInsignia.Id && x.InsigniaId.Value == jtmRoyal.Id) .ToList() .Count() == 0) @@ -571,8 +529,8 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix ?? "")}{p.FirstName} {p.LastName}", Position = p.Position ?? "", Rank = p.PosLevel ?? "", - ProfileDateAppoint = p.DateAppoint!.Value, - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), PosNo = p.PosNo, PositionLevelId = p.PosLevel == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") @@ -590,21 +548,21 @@ namespace BMA.EHR.Application.Repositories : p.ProfileInsignia!.OrderByDescending(x => x.Year).FirstOrDefault()!.InsigniaId.Value, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, IsHigherLevel = IsHigherLevel(p.ProfileInsignia.ToList() - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != coinInsignia.Id) + .Where(x => x.InsigniaId.Value != coinInsignia.Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "จัตุรถาภรณ์มงกุฎไทย"), FirstRecvInsigniaYear = p.ProfileInsignia == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == bcmRoyal.Id).OrderBy(x => x.Year) + p.ProfileInsignia.Where(x => x.InsigniaId.Value == bcmRoyal.Id).OrderBy(x => x.Year) .FirstOrDefault() == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == bcmRoyal.Id).OrderBy(x => x.Year) - .FirstOrDefault()?.Year, + p.ProfileInsignia.Where(x => x.InsigniaId.Value == bcmRoyal.Id).OrderBy(x => x.Year) + .FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount ?? 0, Amount = p.Amount ?? 0, RootId = p.RootId, @@ -622,12 +580,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => (x.SalaryCondition >= 8340 && x.SalaryCondition < 10150) && !x.IsHigherLevel) @@ -687,12 +639,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList(); @@ -794,8 +740,8 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix ?? "")}{p.FirstName} {p.LastName}", Position = p.Position ?? "", Rank = p.PosLevel ?? "", - ProfileDateAppoint = p.DateAppoint!.Value, - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), PosNo = p.PosNo, PositionLevelId = p.PosLevelId, PositionLevelName = p.PosLevel, @@ -811,13 +757,12 @@ namespace BMA.EHR.Application.Repositories : p.ProfileInsignia!.OrderByDescending(x => x.Year).FirstOrDefault()!.InsigniaId.Value, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PositionSalaryAmount = p.PositionSalaryAmount ?? 0, - ProfileInsignia = p.ProfileInsignia, Amount = p.Amount ?? 0, RootId = p.RootId, RootDnaId = p.RootDnaId, @@ -834,12 +779,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }); var s1 = ((from p in inst_profile @@ -901,13 +840,7 @@ namespace BMA.EHR.Application.Repositories $"2.ได้รับอัตราค่าจ้างตั้งแต่อัตราเงินเดือนขั้นต่ำของข้าราขการพลเรือนระดับชำนาญการขึ้นไป (15,050)", Result = $"อัตราค่าจ้าง {p?.SalaryCondition?.ToString("#,##0")??""}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } })).ToList(); var bcpRoyal = await _dbContext.Set() @@ -923,7 +856,7 @@ namespace BMA.EHR.Application.Repositories var s2 = (from p in allProfilesByRoot where p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 - && (p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != coinInsignia.Id && + && (p.ProfileInsignia.Where(x => x.InsigniaId.Value != coinInsignia.Id && x.InsigniaId.Value == jtmRoyal.Id) .ToList() .Count() == 0) @@ -939,8 +872,8 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix ?? "")}{p.FirstName} {p.LastName}", Position = p.Position ?? "", Rank = p.PosLevel ?? "", - ProfileDateAppoint = p.DateAppoint!.Value, - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), PosNo = p.PosNo, PositionLevelId = p.PosLevelId, PositionLevelName = p.PosLevel, @@ -956,21 +889,21 @@ namespace BMA.EHR.Application.Repositories : p.ProfileInsignia!.OrderByDescending(x => x.Year).FirstOrDefault()!.InsigniaId.Value, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, IsHigherLevel = IsHigherLevel(p.ProfileInsignia.ToList() - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != coinInsignia.Id) + .Where(x => x.InsigniaId.Value != coinInsignia.Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "จัตุรถาภรณ์มงกุฎไทย"), FirstRecvInsigniaYear = p.ProfileInsignia == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == bcpRoyal.Id).OrderBy(x => x.Year) + p.ProfileInsignia.Where(x => x.InsigniaId.Value == bcpRoyal.Id).OrderBy(x => x.Year) .FirstOrDefault() == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == bcpRoyal.Id).OrderBy(x => x.Year) - .FirstOrDefault()?.Year, + p.ProfileInsignia.Where(x => x.InsigniaId.Value == bcpRoyal.Id).OrderBy(x => x.Year) + .FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount ?? 0, Amount = p.Amount ?? 0, RootId = p.RootId, @@ -988,12 +921,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => (x.SalaryCondition >= 10150) && !x.IsHigherLevel) @@ -1052,20 +979,14 @@ namespace BMA.EHR.Application.Repositories $"2.ได้ บ.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้รับ บ.ช. ก่อนวันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()})", Result = $"ได้รับ บ.ช. ในปี {p.FirstRecvInsigniaYear}" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); var s3 = (from p in allProfilesByRoot where p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 - && (p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != coinInsignia.Id && + && (p.ProfileInsignia.Where(x => x.InsigniaId.Value != coinInsignia.Id && x.InsigniaId.Value == jtcRoyal.Id) .ToList() .Count() == 0) @@ -1081,8 +1002,8 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix ?? "")}{p.FirstName} {p.LastName}", Position = p.Position ?? "", Rank = p.PosLevel ?? "", - ProfileDateAppoint = p.DateAppoint!.Value, - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), PosNo = p.PosNo, PositionLevelId = p.PosLevelId, PositionLevelName = p.PosLevel, @@ -1098,21 +1019,21 @@ namespace BMA.EHR.Application.Repositories : p.ProfileInsignia!.OrderByDescending(x => x.Year).FirstOrDefault()!.InsigniaId.Value, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, IsHigherLevel = IsHigherLevel(p.ProfileInsignia.ToList() - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != coinInsignia.Id) + .Where(x => x.InsigniaId.Value != coinInsignia.Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "จัตุรถาภรณ์ช้างเผือก"), FirstRecvInsigniaYear = p.ProfileInsignia == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == jtmRoyal.Id).OrderBy(x => x.Year) + p.ProfileInsignia.Where(x => x.InsigniaId.Value == jtmRoyal.Id).OrderBy(x => x.Year) .FirstOrDefault() == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == jtmRoyal.Id).OrderBy(x => x.Year) - .FirstOrDefault()?.Year, + p.ProfileInsignia.Where(x => x.InsigniaId.Value == jtmRoyal.Id).OrderBy(x => x.Year) + .FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -1130,12 +1051,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => (x.SalaryCondition >= 10150) && !x.IsHigherLevel) @@ -1194,13 +1109,7 @@ namespace BMA.EHR.Application.Repositories $"2.ได้ จ.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้รับ จ.ม. ก่อนวันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()})", Result = $"ได้รับ จ.ม. ในปี {p.FirstRecvInsigniaYear}" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -1301,8 +1210,8 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix ?? "")}{p.FirstName} {p.LastName}", Position = p.Position ?? "", Rank = p.PosLevel ?? "", - ProfileDateAppoint = p.DateAppoint!.Value, - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), PosNo = p.PosNo ?? "", PositionLevelId = p.PosLevelId, PositionLevelName = p.PosLevel, @@ -1311,24 +1220,24 @@ namespace BMA.EHR.Application.Repositories Gender = p.Gender ?? "", LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, ProfileInsignia = p.ProfileInsignia, PositionSalaryAmount = p.PositionSalaryAmount, @@ -1348,12 +1257,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }); // check วันที่บรรจะต้องน้อยกว่า 29/5/ปี-5 @@ -1411,13 +1314,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"1.รับราชการก่อน {new DateTime(period.Year - 5, 5, 29).ToThaiFullDate3()}", Result = $"วันที่บรรจุเข้ารับราชการ {p.ProfileDateAppoint.ToThaiFullDate3()}" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } })).ToList(); var s2 = (from p in allProfilesByRoot @@ -1426,9 +1323,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("เบญจมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("เบญจมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -1443,28 +1339,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? "" : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo ?? "", Gender = p.Gender == null ? "" : p.Gender, @@ -1473,9 +1369,9 @@ namespace BMA.EHR.Application.Repositories PositionTypeId = p.PosTypeId, PositionTypeName = p.PosType, IsHigherLevel = IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "เบญจมาภรณ์ช้างเผือก"), PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, @@ -1494,12 +1390,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => x.SalaryCondition < 10190 && !x.IsHigherLevel) @@ -1558,13 +1448,7 @@ namespace BMA.EHR.Application.Repositories $"2.ดำรงตำแหน่งมาแล้วไม่น้อยกว่า 10 ปี บริบูรณ์ (รับราชการก่อน {new DateTime(period.Year - 10, 5, 29).ToThaiFullDate3()})", Result = $"วันที่บรรจุเข้ารับราชการ {p.ProfileDateAppoint.ToThaiFullDate3()}" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -1574,9 +1458,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("จัตุรถาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("จัตุรถาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -1591,28 +1474,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? "" : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo ?? "", Gender = p.Gender == null ? "" : p.Gender, @@ -1622,14 +1505,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "จัตุรถาภรณ์มงกุฎไทย"), PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, @@ -1648,12 +1531,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => x.SalaryCondition >= 10190 && !x.IsHigherLevel) @@ -1705,13 +1582,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือน ณ วันที่ {(new DateTime(period.Year, 4, 29)).ToThaiFullDate3()} 10,190 บาทขึ้นไป)", Result = $"ได้รับเงินเดือน {p.SalaryCondition} บาท" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -1721,9 +1592,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("จัตุรถาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("จัตุรถาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -1738,28 +1608,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? "" : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo ?? "", Gender = p.Gender == null ? "" : p.Gender, @@ -1769,14 +1639,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "จัตุรถาภรณ์ช้างเผือก"), PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, @@ -1795,12 +1665,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => x.SalaryCondition >= 10190 && !x.IsHigherLevel) @@ -1859,13 +1723,7 @@ namespace BMA.EHR.Application.Repositories $"2.ดำรงตำแหน่งมาแล้วไม่น้อยกว่า 10 ปี บริบูรณ์ (รับราชการก่อน {new DateTime(period.Year - 10, 5, 29).ToThaiFullDate3()})", Result = $"วันที่บรรจุเข้ารับราชการ {p.ProfileDateAppoint.ToThaiFullDate3()}" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -1975,9 +1833,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ตริตาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ตริตาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -1992,28 +1849,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -2023,14 +1880,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ตริตาภรณ์มงกุฎไทย"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -2051,12 +1908,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Select(p => new InsigniaResultSet @@ -2106,13 +1957,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"1.เป็นระดับชำนาญงาน", Result = $"ตำแหน่ง {p.Position} ประเภท {p.PositionType} ระดับ {p.PositionLevel}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -2122,9 +1967,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ตริตาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ตริตาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -2139,28 +1983,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -2170,14 +2014,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ตริตาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -2185,7 +2029,7 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญงาน").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญงาน").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -2203,12 +2047,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => x.FirstPositonLevelDate < new DateTime(period.Year - 5, 5, 29)) @@ -2261,13 +2099,7 @@ namespace BMA.EHR.Application.Repositories Result = $"ดำรงตำแหน่ง {p.Position} ประเภท {p.PositionType} ระดับ {p.PositionLevel} ตั้งแต่วันที่ {(p.FirstPositonLevelDate == null ? "-" : p.FirstPositonLevelDate.Value.ToThaiFullDate3())}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -2341,9 +2173,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -2358,28 +2189,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -2389,14 +2220,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ทวีติยาภรณ์มงกุฎไทย"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -2404,7 +2235,7 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -2422,12 +2253,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Select(p => new InsigniaResultSet @@ -2477,13 +2302,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"1.เป็นระดับอาวุโส", Result = $"ตำแหน่ง {p.Position} ประเภท {p.PositionType} ระดับ {p.PositionLevel}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -2493,9 +2312,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -2510,28 +2328,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -2541,14 +2359,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ทวีติยาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -2556,7 +2374,7 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -2574,12 +2392,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => x.FirstPositonLevelDate < new DateTime(period.Year - 5, 5, 29)) @@ -2632,13 +2444,7 @@ namespace BMA.EHR.Application.Repositories Result = $"ดำรงตำแหน่ง {p.Position} ประเภท {p.PositionType} ระดับ {p.PositionLevel} ตั้งแต่วันที่ {(p.FirstPositonLevelDate == null ? "-" : p.FirstPositonLevelDate.Value.ToThaiFullDate3())}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -2713,9 +2519,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -2730,28 +2535,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -2761,14 +2566,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ทวีติยาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -2776,7 +2581,7 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -2794,12 +2599,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Select(p => new InsigniaResultSet @@ -2849,13 +2648,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"1.เป็นระดับทักษะพิเศษ", Result = $"ตำแหน่ง {p.Position} ประเภท {p.PositionType} ระดับ {p.PositionLevel}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -2866,9 +2659,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -2883,28 +2675,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -2914,14 +2706,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์มงกุฎไทย"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -2929,14 +2721,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -2954,12 +2746,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => x.FirstRecvInsigniaYear != 0 && x.FirstRecvInsigniaYear <= period.Year - 3) @@ -3011,13 +2797,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้รับ ท.ช. ก่อนวันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()})", Result = $"ได้รับ ท.ช. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -3028,9 +2808,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -3045,28 +2824,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -3076,14 +2855,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -3091,14 +2870,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -3116,12 +2895,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => x.FirstRecvInsigniaYear != 0 && x.FirstRecvInsigniaYear <= period.Year - 5) @@ -3173,13 +2946,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้รับ ป.ม. ก่อนวันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()})", Result = $"ได้รับ ป.ม. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -3275,9 +3042,8 @@ namespace BMA.EHR.Application.Repositories where p.PosType == "วิชาการ" && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ตริตาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ตริตาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -3292,28 +3058,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -3323,14 +3089,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ตริตาภรณ์มงกุฎไทย"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -3338,14 +3104,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -3363,12 +3129,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Select(p => new InsigniaResultSet @@ -3418,13 +3178,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"1.รับราชการก่อน {new DateTime(period.Year - 5, 5, 29).ToThaiFullDate3()}", Result = $"วันที่บรรจุเข้ารับราชการ {p.ProfileDateAppoint.ToThaiFullDate3()}" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -3481,9 +3235,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ตริตาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ตริตาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -3498,28 +3251,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -3529,14 +3282,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ตริตาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -3544,14 +3297,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญการ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญการ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -3569,12 +3322,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Select(p => new InsigniaResultSet @@ -3624,13 +3371,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"1.เป็นระดับชำนาญการ", Result = $"ตำแหน่ง {p.Position} ประเภท {p.PositionType} ระดับ {p.PositionLevel}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -3640,9 +3381,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -3657,28 +3397,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -3688,14 +3428,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ทวีติยาภรณ์มงกุฎไทย"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -3703,14 +3443,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญการ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญการ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -3728,12 +3468,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.SalaryCondition >= 22140) @@ -3786,13 +3520,7 @@ namespace BMA.EHR.Application.Repositories Result = $"เงินเดือน ณ วันที่ {(new DateTime(period.Year, 4, 29)).ToThaiFullDate3()} เป็นเงิน {p.SalaryCondition} บาท" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -3802,9 +3530,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -3819,28 +3546,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year - 5, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year - 5, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year - 5, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year - 5, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -3850,14 +3577,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ทวีติยาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -3865,14 +3592,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญการ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญการ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -3890,12 +3617,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.SalaryCondition >= 22140) @@ -3948,13 +3669,7 @@ namespace BMA.EHR.Application.Repositories Result = $"เงินเดือนก่อนวันที่ {(new DateTime(period.Year - 5, 4, 29)).ToThaiFullDate3()} เป็นเงิน {p.SalaryCondition} บาท" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -4048,9 +3763,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -4065,28 +3779,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -4096,14 +3810,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ทวีติยาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -4111,14 +3825,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญการพิเศษ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญการพิเศษ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -4136,12 +3850,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Select(p => new InsigniaResultSet @@ -4174,13 +3882,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"1.เป็นระดับชำนาญการพิเศษ", Result = $"ตำแหน่ง {p.Position} ประเภท {p.PositionType} ระดับ {p.PositionLevel}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -4190,9 +3892,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -4207,28 +3908,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -4238,14 +3939,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์มงกุฎไทย"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, @@ -4254,14 +3955,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญการพิเศษ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ชำนาญการพิเศษ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -4279,12 +3980,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.SalaryCondition >= 58390) @@ -4344,13 +4039,7 @@ namespace BMA.EHR.Application.Repositories $"2.ได้ ท.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ท.ช. วันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()} หรือก่อนหน้านั้น)", Result = $"ได้รับ ท.ช. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -4425,9 +4114,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -4442,28 +4130,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -4473,14 +4161,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ทวีติยาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -4488,14 +4176,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "เชี่ยวชาญ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "เชี่ยวชาญ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -4513,12 +4201,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Select(p => new InsigniaResultSet @@ -4568,13 +4250,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"1.เป็นระดับเชี่ยวชาญ", Result = $"ตำแหน่ง {p.Position} ประเภท {p.PositionType} ระดับ {p.PositionLevel}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -4585,9 +4261,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -4602,28 +4277,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -4633,14 +4308,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์มงกุฎไทย"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, @@ -4649,14 +4324,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "เชี่ยวชาญ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "เชี่ยวชาญ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -4674,12 +4349,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 3) @@ -4731,13 +4400,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. ก่อนวันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()})", Result = $"ได้รับ ท.ช. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -4747,9 +4410,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -4764,28 +4426,28 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -4795,14 +4457,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -4810,14 +4472,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "เชี่ยวชาญ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "เชี่ยวชาญ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -4835,12 +4497,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 5) @@ -4892,13 +4548,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ท.ช. ก่อนวันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()})", Result = $"ได้รับ ป.ม. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -4991,9 +4641,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -5008,29 +4657,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -5040,14 +4689,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -5055,14 +4704,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ทรงคุณวุฒิ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ทรงคุณวุฒิ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -5080,12 +4729,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => x.FirstRecvInsigniaYear != 0 && x.FirstRecvInsigniaYear <= period.Year - 3) @@ -5143,13 +4786,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"ได้รับเงินประจำตำแหน่ง 13,000 บาท", Result = $"ได้รับเงินประจำตำแหน่ง {p.SalaryPosition} บาท" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -5159,9 +4796,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) .ToList() .Count() == 0) select new @@ -5176,29 +4812,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo == null ? "" : p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -5208,14 +4844,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "มหาวชิรมงกุฎ"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -5223,14 +4859,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ทรงคุณวุฒิ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ทรงคุณวุฒิ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -5248,12 +4884,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 3) @@ -5311,13 +4941,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"ได้รับเงินประจำตำแหน่ง 13,000 บาท", Result = $"ได้รับเงินประจำตำแหน่ง {p.SalaryPosition} บาท" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -5327,9 +4951,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("มหาปรมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("มหาปรมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -5344,29 +4967,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, @@ -5377,14 +5000,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "มหาปรมาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, @@ -5393,12 +5016,12 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ทรงคุณวุฒิ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ทรงคุณวุฒิ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) + p.ProfileInsignia.Where(x => x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + p.ProfileInsignia.Where(x => x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -5416,13 +5039,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate - }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 5) @@ -5480,13 +5096,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"ได้รับเงินประจำตำแหน่ง 13,000 บาท", Result = $"ได้รับเงินประจำตำแหน่ง {p.SalaryPosition} บาท" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -5577,9 +5187,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -5594,29 +5203,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -5626,14 +5235,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -5641,14 +5250,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ทรงคุณวุฒิ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ทรงคุณวุฒิ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -5666,12 +5275,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(x => x.FirstRecvInsigniaYear != 0 && x.FirstRecvInsigniaYear <= period.Year - 3) @@ -5729,13 +5332,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"ได้รับเงินประจำตำแหน่ง 15,600 บาท", Result = $"ได้รับเงินประจำตำแหน่ง {p.SalaryPosition} บาท" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -5745,9 +5342,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) .ToList() .Count() == 0) select new @@ -5762,29 +5358,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -5794,14 +5390,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "มหาวชิรมงกุฎ"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -5809,14 +5405,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "อาวุโส").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -5834,12 +5430,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 3) @@ -5897,13 +5487,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"ได้รับเงินประจำตำแหน่ง 15,600 บาท", Result = $"ได้รับเงินประจำตำแหน่ง {p.SalaryPosition} บาท" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -5913,9 +5497,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("มหาปรมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("มหาปรมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -5930,29 +5513,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -5962,14 +5545,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "มหาปรมาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -5977,12 +5560,12 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ทรงคุณวุฒิ").OrderBy(p => p.Date) .FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ทรงคุณวุฒิ").OrderBy(p => p.Date) - .FirstOrDefault()?.Date, + .FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) + p.ProfileInsignia.Where(x => x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + p.ProfileInsignia.Where(x => x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -6000,12 +5583,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 3) @@ -6063,13 +5640,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"ได้รับเงินประจำตำแหน่ง 15,600 บาท", Result = $"ได้รับเงินประจำตำแหน่ง {p.SalaryPosition} บาท" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -6159,9 +5730,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -6176,29 +5746,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? "" : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo == null ? "" : p.PosNo, Gender = p.Gender == null ? "" : p.Gender, @@ -6208,14 +5778,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ทวีติยาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -6223,12 +5793,12 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ต้น" && x.PositionType == "อำนวยการ") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ต้น" && x.PositionType == "อำนวยการ") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) + p.ProfileInsignia.Where(x => x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + p.ProfileInsignia.Where(x => x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -6246,12 +5816,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Select(p => new InsigniaResultSet @@ -6301,13 +5865,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"1.เป็นระดับอำนวยการ/ต้น", Result = $"ตำแหน่ง {p.Position} ประเภท {p.PositionType} ระดับ {p.PositionLevel}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -6317,9 +5875,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -6334,29 +5891,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? "" : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? "" : p.Gender, @@ -6366,14 +5923,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์มงกุฎไทย"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -6381,14 +5938,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ต้น" && x.PositionType == "อำนวยการ") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ต้น" && x.PositionType == "อำนวยการ") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -6406,12 +5963,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.SalaryCondition >= 58390) @@ -6471,13 +6022,7 @@ namespace BMA.EHR.Application.Repositories $"2.ได้ ท.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ท.ช. วันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()} หรือก่อนหน้านั้น)", Result = $"ได้รับ ท.ช. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -6546,9 +6091,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -6563,29 +6107,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? "" : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? "" : p.Gender, @@ -6595,14 +6139,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์มงกุฎไทย"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -6610,14 +6154,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "อำนวยการ") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "อำนวยการ") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -6635,12 +6179,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 3) @@ -6692,13 +6230,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. วันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()} หรือก่อนหน้านั้น)", Result = $"ได้รับ ท.ช. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -6708,9 +6240,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -6725,29 +6256,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? "" : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? "" : p.Gender, @@ -6757,14 +6288,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -6772,14 +6303,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "อำนวยการ") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "อำนวยการ") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -6797,12 +6328,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 3) @@ -6854,13 +6379,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()} หรือก่อนหน้านั้น)", Result = $"ได้รับ ป.ม. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -6871,9 +6390,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) .ToList() .Count() == 0) select new @@ -6888,29 +6406,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? "" : p.Gender, @@ -6920,14 +6438,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "มหาวชิรมงกุฎ"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -6935,14 +6453,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "อำนวยการ") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "อำนวยการ") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -6960,12 +6478,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 5) @@ -7017,13 +6529,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ป.ช. วันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()} หรือก่อนหน้านั้น)", Result = $"ได้รับ ป.ช. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -7113,9 +6619,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .ToList() .Count() == 0) select new @@ -7130,29 +6635,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -7162,14 +6667,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์มงกุฎไทย"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -7177,14 +6682,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ต้น" && x.PositionType == "บริหาร") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ต้น" && x.PositionType == "บริหาร") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ทวีติยาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -7202,12 +6707,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 3) @@ -7259,13 +6758,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. วันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()} หรือก่อนหน้านั้น)", Result = $"ได้รับ ท.ช. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -7275,9 +6768,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -7292,29 +6784,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -7324,14 +6816,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -7339,14 +6831,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ต้น" && x.PositionType == "บริหาร") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ต้น" && x.PositionType == "บริหาร") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -7364,12 +6856,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 3) @@ -7421,13 +6907,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()} หรือก่อนหน้านั้น)", Result = $"ได้รับ ป.ม. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -7437,9 +6917,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) .ToList() .Count() == 0) select new @@ -7454,29 +6933,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -7486,14 +6965,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "มหาวชิรมงกุฎ"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -7501,14 +6980,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "ต้น" && x.PositionType == "บริหาร") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "ต้น" && x.PositionType == "บริหาร") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -7526,12 +7005,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 5) @@ -7583,13 +7056,7 @@ namespace BMA.EHR.Application.Repositories $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ป.ช. วันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()} หรือก่อนหน้านั้น)", Result = $"ได้รับ ป.ช. ในปี {p.FirstRecvInsigniaYear.Value.ToThaiYear()}" }, - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -7650,9 +7117,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -7667,29 +7133,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -7699,14 +7165,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "ประถมาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -7714,14 +7180,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "บริหาร") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "บริหาร") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์มงกุฎไทย").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -7739,12 +7205,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 3) @@ -7802,13 +7262,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"ได้รับเงินประจำตำแหน่ง 14,500 บาท", Result = $"ได้รับเงินประจำตำแหน่ง {p.SalaryPosition} บาท" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -7818,9 +7272,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) .ToList() .Count() == 0) select new @@ -7835,29 +7288,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -7867,14 +7320,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "มหาวชิรมงกุฎ"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -7882,14 +7335,14 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "บริหาร") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "บริหาร") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + .Where(x => x.InsigniaId.Value == GetInsigniaByName("ประถมาภรณ์ช้างเผือก").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -7907,12 +7360,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 3) @@ -7970,13 +7417,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"ได้รับเงินประจำตำแหน่ง 14,500 บาท", Result = $"ได้รับเงินประจำตำแหน่ง {p.SalaryPosition} บาท" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -7986,9 +7427,8 @@ namespace BMA.EHR.Application.Repositories && p.ProfileInsignia != null && p.ProfileInsignia.Count > 0 && (p.ProfileInsignia.Where(x => - x.InsigniaId.HasValue && - x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id && - x.InsigniaId.Value == GetInsigniaByName("มหาปรมาภรณ์ช้างเผือก")?.Id) + x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id && + x.InsigniaId.Value == GetInsigniaByName("มหาปรมาภรณ์ช้างเผือก").Id) .ToList() .Count() == 0) select new @@ -8003,29 +7443,29 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix == null ? null : p.Prefix)}{p.FirstName} {p.LastName}", Position = p.Position == null ? null : p.Position, Rank = p.PosLevel ?? "", - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), - ProfileDateAppoint = p.DateAppoint!.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryPosition = p.PositionSalaryAmount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PosNo = p.PosNo, Gender = p.Gender == null ? null : p.Gender, @@ -8035,14 +7475,14 @@ namespace BMA.EHR.Application.Repositories PositionTypeName = p.PosType, IsHigherLevel = p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? true : IsHigherLevel(p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != - GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != + GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .OrderByDescending(x => x.Year) - .FirstOrDefault(), + .FirstOrDefault().Insignia, "มหาปรมาภรณ์ช้างเผือก"), PositionLevel = p.PosLevel == null ? "" : p.PosLevel, PositionType = p.PosType == null ? "" : p.PosType, @@ -8050,12 +7490,12 @@ namespace BMA.EHR.Application.Repositories p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "บริหาร") .OrderBy(p => p.Date).FirstOrDefault() == null ? null : p.ProfileSalary.Where(x => x.PositionLevel == "สูง" && x.PositionType == "บริหาร") - .OrderBy(p => p.Date).FirstOrDefault()?.Date, + .OrderBy(p => p.Date).FirstOrDefault().Date, FirstRecvInsigniaYear = p.ProfileInsignia.Count == 0 ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) + p.ProfileInsignia.Where(x => x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) .OrderBy(x => x.Year).FirstOrDefault() == null ? 0 : - p.ProfileInsignia.Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ")?.Id) - .OrderBy(x => x.Year).FirstOrDefault()?.Year, + p.ProfileInsignia.Where(x => x.InsigniaId.Value == GetInsigniaByName("มหาวชิรมงกุฎ").Id) + .OrderBy(x => x.Year).FirstOrDefault().Year, PositionSalaryAmount = p.PositionSalaryAmount, Amount = p.Amount, RootId = p.RootId, @@ -8073,12 +7513,6 @@ namespace BMA.EHR.Application.Repositories Child4Id = p.Child4Id, Child4DnaId = p.Child4DnaId, Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }) .ToList() .Where(p => p.FirstRecvInsigniaYear != 0 && p.FirstRecvInsigniaYear <= period.Year - 5) @@ -8136,13 +7570,7 @@ namespace BMA.EHR.Application.Repositories Condition = $"ได้รับเงินประจำตำแหน่ง 14,500 บาท", Result = $"ได้รับเงินประจำตำแหน่ง {p.SalaryPosition} บาท" } - }, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate + } }) .ToList(); @@ -8193,219 +7621,6 @@ namespace BMA.EHR.Application.Repositories #region " Public " - /// - /// ประมวลผลรายชื่อผู้ได้รับเครื่องราชย์ของแต่ละหน่วยงาน - /// - /// รหัสรอบการขอ - /// รหัสหน่วยงาน - /// officer or employee - /// ผลการคำนวนการขอพระราชทานเครื่องราชย์ - public async Task> GetInsigniaCandidateBKKByTypeAsync(Guid periodId, Guid ocId, string type = "officer") - { - try - { - var result_candidate = new List(); - - var period = await _dbContext.Set().Include(x => x.InsigniaEmployees).FirstOrDefaultAsync(p => p.Id == periodId); - if (period == null) - { - throw new Exception(GlobalMessages.InsigniaPeriodNotFound); - } - - if (type.ToLower().Trim() == "officer") - { - var allOfficerProfilesByRoot = (await _userProfileRepository.GetOfficerProfileByRootIdAsync(ocId, AccessToken)); - if (allOfficerProfilesByRoot != null) - { - // calculate ตามแต่ละชั้น - var type_coin = allOfficerProfilesByRoot.Count() > 0 ? await GetCoinCandidate(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type1_level1 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type1_Level1(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type1_level2 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type1_Level2(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type1_level3 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type1_Level3(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type1_level4 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type1_Level4(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type2_level5 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level5(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type2_level6 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level6(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type2_level7 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level7(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type2_level8 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level8(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type2_level9_1 = - allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level9_1(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type2_level9_2 = - allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level9_2(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type3_level10 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type3_Level10(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type3_level11 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type3_Level11(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type4_level10 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type4_Level10(periodId, ocId, allOfficerProfilesByRoot) : new List(); - var type4_level11 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type4_Level11(periodId, ocId, allOfficerProfilesByRoot) : new List(); - - - // union result - foreach (var r in type_coin) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type4_level11) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type4_level10) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type3_level11) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type3_level10) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type2_level9_2) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type2_level9_1) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type2_level8) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type2_level7) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type2_level6) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type2_level5) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type1_level4) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type1_level3) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type1_level2) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in type1_level1) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - // ย้ายที่ตามที่ มอสแจ้ง - if (period.Round != 1) - { - var insigniaIdList = await _dbContext.Set() - .Include(x => x.InsigniaType) - .Where(x => x.InsigniaType!.Name == "ชั้นสายสะพาย") - .Select(x => x.Id) - .ToListAsync(); - - - result_candidate = result_candidate.Where(x => insigniaIdList.Contains(x.RequestInsignia.Id)).ToList(); - } - } - } - else if (type.ToLower().Trim() == "employee") - { - var allEmployeeProfileByRoot = new List(); - if (period != null && period.InsigniaEmployees != null) - { - allEmployeeProfileByRoot = (await _userProfileRepository.GetEmployeeProfileByPositionAsync(ocId, period.InsigniaEmployees.Select(x => x.RefId!.ValueOrBlank()).ToArray(), AccessToken)); - } - - if (allEmployeeProfileByRoot != null) - { - var type_coin = allEmployeeProfileByRoot.Count() > 0 ? await GetCoinCandidate(periodId, ocId, allEmployeeProfileByRoot) : new List(); - - var employee_type1 = allEmployeeProfileByRoot.Count() > 0 ? await GetEmployeeInsignia_Type1(periodId, ocId, allEmployeeProfileByRoot) : new List(); - var employee_type2 = allEmployeeProfileByRoot.Count() > 0 ? await GetEmployeeInsignia_Type2(periodId, ocId, allEmployeeProfileByRoot) : new List(); - - // union result - foreach (var r in type_coin) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in employee_type2) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - - foreach (var r in employee_type1) - { - var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); - if (old == null) - result_candidate.Add(r); - } - } - } - else - throw new Exception(GlobalMessages.CalculateTypeNotValid); - - return result_candidate.OrderBy(x => x.Seq).ThenBy(x => x.Gender).ThenBy(x => x.ProfileId).ToList(); - } - catch - { - throw; - } - } - /// /// ประมวลผลรายชื่อผู้ได้รับเครื่องราชย์ของแต่ละหน่วยงาน /// @@ -8425,7 +7640,7 @@ namespace BMA.EHR.Application.Repositories if (period != null && period.InsigniaEmployees != null) { allEmployeeProfileByRoot = - (await _userProfileRepository.GetEmployeeProfileByPositionAsync(ocId, period.InsigniaEmployees.Select(x => x.RefId!.ValueOrBlank()).ToArray(), AccessToken)); + (await _userProfileRepository.GetEmployeeProfileByPositionAsync(ocId, period.InsigniaEmployees.Select(x => x.RefId), AccessToken)); } var type_coin = allOfficerProfilesByRoot.Count() > 0 ? await GetCoinCandidate(periodId, ocId, allOfficerProfilesByRoot) : new List(); @@ -8556,19 +7771,6 @@ namespace BMA.EHR.Application.Repositories result_candidate.Add(r); } - // ย้ายที่ตามที่ มอสแจ้ง - if (period.Round != 1) - { - var insigniaIdList = await _dbContext.Set() - .Include(x => x.InsigniaType) - .Where(x => x.InsigniaType!.Name == "ชั้นสายสะพาย") - .Select(x => x.Id) - .ToListAsync(); - - - result_candidate = result_candidate.Where(x => insigniaIdList.Contains(x.RequestInsignia.Id)).ToList(); - } - foreach (var r in employee_type2) { var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId); @@ -8591,8 +7793,6 @@ namespace BMA.EHR.Application.Repositories // result_candidate.Add(r); //} - - return result_candidate.OrderBy(x => x.Seq).ThenBy(x => x.Gender).ThenBy(x => x.ProfileId).ToList(); } catch @@ -8612,7 +7812,7 @@ namespace BMA.EHR.Application.Repositories if (period == null) throw new Exception(GlobalMessages.CoinPeriodNotFound); - var inst_profile = allProfilesByRoot.Where(x => x.DateAppoint.HasValue && x.DateAppoint != null) + var inst_profile = allProfilesByRoot.Where(x => x.DateAppoint != null) .Select(p => new { ProfileId = p.Id, @@ -8625,8 +7825,8 @@ namespace BMA.EHR.Application.Repositories FullName = $"{(p.Prefix ?? "")}{p.FirstName} {p.LastName}", Position = p.Position ?? "", Rank = p.PosLevel ?? "", - ProfileDateAppoint = p.DateAppoint!.Value, - GovAge = p.DateStart!.Value.CalculateGovAgeStr(0, 0), + ProfileDateAppoint = p.DateAppoint.Value, + GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0), PosNo = p.PosNo, PositionLevelId = p.PosLevelId, PositionLevelName = p.PosLevel, @@ -8635,49 +7835,26 @@ namespace BMA.EHR.Application.Repositories Gender = p.Gender ?? "", LastInsignia = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? "" : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.Insignia, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().Insignia, LastInsigniaId = p.ProfileInsignia == null || p.ProfileInsignia.Count == 0 ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) .FirstOrDefault() == null ? Guid.Empty : p.ProfileInsignia - .Where(x => x.InsigniaId.HasValue && x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา")?.Id) - .OrderByDescending(x => x.Year).FirstOrDefault()?.InsigniaId, + .Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id) + .OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId, Salary = p.Amount, SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 : - p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) + p.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) .OrderByDescending(x => x.Order).FirstOrDefault() != null ? p.ProfileSalary - .Where(x => x.Date != null).Where(x => x.Date.HasValue && x.Date.Value <= new DateTime(period.Year, 4, 29)) - .OrderByDescending(x => x.Order).FirstOrDefault()?.Amount : + .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)) + .OrderByDescending(x => x.Order).FirstOrDefault().Amount : p.Amount, PositionSalaryAmount = p.PositionSalaryAmount, - ProfileInsignia = p.ProfileInsignia, - Amount = p.Amount, - RootId = p.RootId, - RootDnaId = p.RootDnaId, - Root = p.Root, - Child1Id = p.Child1Id, - Child1DnaId = p.Child1DnaId, - Child1 = p.Child1, - Child2Id = p.Child2Id, - Child2DnaId = p.Child2DnaId, - Child2 = p.Child2, - Child3Id = p.Child3Id, - Child3DnaId = p.Child3DnaId, - Child3 = p.Child3, - Child4Id = p.Child4Id, - Child4DnaId = p.Child4DnaId, - Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate }); // check วันที่บรรจะต้องมากกว่า 25 ปี @@ -8709,31 +7886,6 @@ namespace BMA.EHR.Application.Repositories Seq = 1, Gender = p.Gender, MatchingConditions = new List(), - - - Amount = p.Amount, - RootId = p.RootId, - RootDnaId = p.RootDnaId, - Root = p.Root, - Child1Id = p.Child1Id, - Child1DnaId = p.Child1DnaId, - Child1 = p.Child1, - Child2Id = p.Child2Id, - Child2DnaId = p.Child2DnaId, - Child2 = p.Child2, - Child3Id = p.Child3Id, - Child3DnaId = p.Child3DnaId, - Child3 = p.Child3, - Child4Id = p.Child4Id, - Child4DnaId = p.Child4DnaId, - Child4 = p.Child4, - ProfileType = p.ProfileType, - - MarkDiscipline = p.MarkDiscipline, - MarkInsignia = p.MarkInsignia, - MarkLeave = p.MarkLeave, - MarkRate = p.MarkRate - })).ToList(); var result_candidate = new List(); @@ -8764,9 +7916,6 @@ namespace BMA.EHR.Application.Repositories } } - - - #endregion #region " From Ming " @@ -8800,23 +7949,6 @@ namespace BMA.EHR.Application.Repositories } } - public async Task GetRequestIdByTypeAsync(Guid period, Guid ocId, string type = "officer") - { - try - { - var req = await _dbContext.Set() - .Where(x => x.OrganizationId != null) - .FirstOrDefaultAsync(x => x.Period.Id == period && x.OrganizationId == ocId && x.ProfileType.ToLower() == type.ToLower()); - if (req == null) - return null; - return req.Id; - } - catch - { - throw; - } - } - // Save Aprove public async Task SaveAprove(Guid period, Guid ocId) { @@ -8843,31 +7975,6 @@ namespace BMA.EHR.Application.Repositories } } - public async Task SaveApproveByTypeAsync(Guid period, Guid ocId, string type = "officer") - { - try - { - var req = await GetRequestIdByTypeAsync(period, ocId, type); - - if (req != null) - { - var insigniaRequestProfiles = await _dbContext.Set() - .Where(x => x.Request.Id == req) - .ToListAsync(); - foreach (var insigniaRequestProfile in insigniaRequestProfiles) - { - insigniaRequestProfile.IsApprove = true; - } - } - - await _dbContext.SaveChangesAsync(); - } - catch - { - throw; - } - } - // เช็คข้อมูล ใน table insignia_request_new public async Task GetInsigniaRequest(Guid id, Guid ocId) { @@ -8917,60 +8024,12 @@ namespace BMA.EHR.Application.Repositories } } - public async Task GetInsigniaRequestByTypeAsync(Guid id, Guid ocId, string type = "officer") - { - try - { - var period = await _dbContext.Set() - .Select(p => new - { - Id = p.Id, - Name = p.Name, - Round = p.Round, - Year = p.Year, - IsLock = p.IsLock, - }) - .FirstOrDefaultAsync(x => x.Id == id); - - if (period == null) - return null; - else - { - var request = await _dbContext.Set() - .Include(x => x.Document) - .FirstOrDefaultAsync(x => x.Period.Id == period.Id && x.OrganizationId == ocId && x.ProfileType.ToLower() == type.ToLower()); - - return new InsigniaResults - { - PeriodId = period.Id, - Year = period.Year, - Round = period.Round, - Name = period.Name, - IsLock = period.IsLock, - RequestId = request == null ? null : request.Id, - RequestNote = request == null ? "" : request.RequestNote, - RequestStatus = request == null ? null : request.RequestStatus, - OrganizationName = request == null ? "" : request.Organization, - Document = request == null - ? null - : (request.Document == null - ? null - : await _documentService.ImagesPath(request.Document.Id)), - }; - } - } - catch - { - throw; - } - } - // Get Data Table insignai_has_profile - public async Task> InsigniaHasProfile(Guid period, Guid ocId, string status, string type = "officer") + public async Task> InsigniaHasProfile(Guid period, Guid ocId, string status) { try { - var id = await GetRequestIdByTypeAsync(period, ocId, type); + var id = await GetRequestId(period, ocId); if (id != null) { var raw_result = _dbContext.Set() @@ -9007,7 +8066,6 @@ namespace BMA.EHR.Application.Repositories MarkDiscipline = h.MarkDiscipline, MarkLeave = h.MarkLeave, MarkRate = h.MarkRate, - MarkInsignia = h.MarkInsignia, MatchingConditions = h.MatchingConditions == null || h.MatchingConditions == "" ? null : JsonConvert.DeserializeObject>(h.MatchingConditions) @@ -9120,109 +8178,14 @@ namespace BMA.EHR.Application.Repositories // } // insert candidate list - - public async Task UpdateCandidateAsync(Guid periodId, Guid ocId, string oc, List items, string type = "officer") + public async Task InsertCandidate(Guid periodId, Guid ocId, string oc, List items) { try { var period = await _dbContext.Set().FirstOrDefaultAsync(p => p.Id == periodId); if (period == null) - throw new Exception(GlobalMessages.InsigniaPeriodNotFound); - - var req = await _dbContext.Set() - .Include(x => x.RequestProfiles) - .Include(x => x.Period) - .Where(x => x.Period.Id == periodId) - .Where(x => x.OrganizationId == ocId) - .Where(x => x.ProfileType.ToLower() == type.ToLower()) - .FirstOrDefaultAsync(); - - if (req != null) - { - foreach (var item in items) - { - var reqInsignia = await _dbContext.Set() - .FirstOrDefaultAsync(i => i.Id == item.RequestInsignia.Id); - - if (reqInsignia == null) throw new Exception(GlobalMessages.InsigniaNotFound); - - var pf = req.RequestProfiles.FirstOrDefault(x => x.ProfileId == item.ProfileId); - if (pf != null) continue; // มีอยู่แล้วข้ามไป - - req.RequestProfiles.Add(new InsigniaRequestProfile - { - Status = "PENDING", - ProfileId = item.ProfileId, - RequestInsignia = reqInsignia, - Salary = item.Salary, - RequestDate = DateTime.Now, - MatchingConditions = - System.Text.Json.JsonSerializer.Serialize(item.MatchingConditions), - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - - // Add Information for reused in API Call - ProfileType = item.ProfileType != null && item.ProfileType != "" ? item.ProfileType.ToLower() : "officer", - Prefix = item.Prefix, - FirstName = item.FirstName, - LastName = item.LastName, - CitizenId = item.CitizenId, - BirthDate = item.BirthDate, - DateAppoint = item.DateAppoint, - Position = item.Position, - Gender = item.Gender, - PosTypeName = item.PosTypeName, - PosLevelName = item.PosLevelName, - PosNo = item.PosNo, - Amount = item.Salary, - PositionSalaryAmount = item.PositionSalary, - LastInsigniaName = item.LastInsignia, - Root = item.Root, - RootId = item.RootId, - RootDnaId = item.RootDnaId, - Child1 = item.Child1, - Child1Id = item.Child1Id, - Child1DnaId = item.Child1DnaId, - Child2 = item.Child2, - Child2Id = item.Child2Id, - Child2DnaId = item.Child2DnaId, - Child3 = item.Child3, - Child3Id = item.Child3Id, - Child3DnaId = item.Child3DnaId, - Child4 = item.Child4, - Child4Id = item.Child4Id, - Child4DnaId = item.Child4DnaId, - - MarkDiscipline = item.MarkDiscipline, - MarkInsignia = item.MarkInsignia, - MarkLeave = item.MarkLeave, - MarkRate = item.MarkRate - }); - } - - await _dbContext.SaveChangesAsync(); - } - } - catch - { - throw; - } - } - - - public async Task InsertCandidate(Guid periodId, Guid ocId, string oc, List items, string type = "officer") - { - try - { - var period = await _dbContext.Set().FirstOrDefaultAsync(p => p.Id == periodId); - - if (period == null) - throw new Exception(GlobalMessages.InsigniaPeriodNotFound); + throw new Exception(GlobalMessages.CoinPeriodNotFound); var periodOlds = await _dbContext.Set().Where(p => p.Year == period.Year).ToListAsync(); foreach (var periodOld in periodOlds) @@ -9250,7 +8213,6 @@ namespace BMA.EHR.Application.Repositories LastUpdateFullName = FullName ?? "System Administrator", LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, - ProfileType = type }; foreach (var item in items) @@ -9277,7 +8239,7 @@ namespace BMA.EHR.Application.Repositories LastUpdatedAt = DateTime.Now, // Add Information for reused in API Call - ProfileType = item.ProfileType != null && item.ProfileType != "" ? item.ProfileType.ToLower() : "officer", + ProfileType = item.ProfileType ?? "officer", Prefix = item.Prefix, FirstName = item.FirstName, LastName = item.LastName, @@ -9307,11 +8269,6 @@ namespace BMA.EHR.Application.Repositories Child4 = item.Child4, Child4Id = item.Child4Id, Child4DnaId = item.Child4DnaId, - - MarkDiscipline = item.MarkDiscipline, - MarkInsignia = item.MarkInsignia, - MarkLeave = item.MarkLeave, - MarkRate = item.MarkRate }); } @@ -9324,53 +8281,6 @@ namespace BMA.EHR.Application.Repositories } } - public async Task UpdateInsigniaRequestProfile(string[] items, string type) - { - try - { - var allProfiles = await _userProfileRepository.GetInsigniaRequestsProfileAsync(items, type, AccessToken); - - if (allProfiles != null && allProfiles.Count > 0) - { - var insigniaRequestProfiles = await _dbContext.Set() - .Where(x => allProfiles.Select(x => x.Id).ToList().Contains(x.ProfileId)) - .ToListAsync(); - - foreach (var insigniaRequestProfile in insigniaRequestProfiles) - { - var profile = allProfiles.FirstOrDefault(p => p.Id == insigniaRequestProfile.ProfileId); - - if (profile != null) - { - insigniaRequestProfile.MarkDiscipline = profile?.MarkDiscipline; - insigniaRequestProfile.MarkLeave = profile?.MarkLeave; - insigniaRequestProfile.MarkRate = profile?.MarkRate; - insigniaRequestProfile.MarkInsignia = profile?.MarkInsignia; - insigniaRequestProfile.APR1 = profile?.APR1; - insigniaRequestProfile.APR2 = profile?.APR2; - insigniaRequestProfile.APR3 = profile?.APR3; - insigniaRequestProfile.APR4 = profile?.APR4; - insigniaRequestProfile.APR5 = profile?.APR5; - insigniaRequestProfile.OCT1 = profile?.OCT1; - insigniaRequestProfile.OCT2 = profile?.OCT2; - insigniaRequestProfile.OCT3 = profile?.OCT3; - insigniaRequestProfile.OCT4 = profile?.OCT4; - insigniaRequestProfile.OCT5 = profile?.OCT5; - insigniaRequestProfile.LastUpdateFullName = FullName ?? "System Administrator"; - insigniaRequestProfile.LastUpdateUserId = UserId ?? ""; - insigniaRequestProfile.LastUpdatedAt = DateTime.Now; - } - } - } - - await _dbContext.SaveChangesAsync(); - - } - catch - { - throw; - } - } #endregion } } \ No newline at end of file diff --git a/BMA.EHR.Application/Repositories/Leaves/GenericLeaveRepository.cs b/BMA.EHR.Application/Repositories/Leaves/GenericLeaveRepository.cs index 2e550d71..5fbbb8a1 100644 --- a/BMA.EHR.Application/Repositories/Leaves/GenericLeaveRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/GenericLeaveRepository.cs @@ -2,11 +2,8 @@ using BMA.EHR.Domain.Models.Base; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; -using Newtonsoft.Json; using System.IO.Pipes; -using System.Net.Http.Headers; using System.Security.Claims; -using System.Text; namespace BMA.EHR.Application.Repositories.Leaves { @@ -46,38 +43,6 @@ namespace BMA.EHR.Application.Repositories.Leaves #region " Methods " - public async Task PostExternalAPIAsync(string apiPath, string accessToken, object? body, string apiKey, CancellationToken cancellationToken = default) - { - try - { - // กำหนด timeout เป็น 30 นาที - using var timeoutCts = new CancellationTokenSource(TimeSpan.FromMinutes(30)); - using var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token); - var json = JsonConvert.SerializeObject(body); - var stringContent = new StringContent(json, Encoding.UTF8, "application/json"); - //stringContent.Headers.ContentType = new MediaTypeHeaderValue("application/json"); - - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", apiKey); - var _res = await client.PostAsync(apiPath, stringContent, combinedCts.Token); - if (_res.IsSuccessStatusCode) - { - var _result = await _res.Content.ReadAsStringAsync(); - - return _result; - } - return string.Empty; - } - } - catch - { - throw; - } - } - - public virtual async Task> GetAllAsync() { return await _dbSet.ToListAsync(); @@ -103,24 +68,6 @@ namespace BMA.EHR.Application.Repositories.Leaves return entity; } - public virtual async Task> AddRangeAsync(List entities) - { - foreach (var entity in entities) - { - if (entity is EntityBase) - { - (entity as EntityBase).CreatedUserId = UserId ?? ""; - (entity as EntityBase).CreatedFullName = FullName ?? "System Administrator"; - (entity as EntityBase).CreatedAt = DateTime.Now; - } - } - - await _dbSet.AddRangeAsync(entities); - await _dbContext.SaveChangesAsync(); - - return entities; - } - public virtual async Task UpdateAsync(T entity) { if (entity is EntityBase) diff --git a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveBeginingRepository.cs b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveBeginingRepository.cs deleted file mode 100644 index add1361b..00000000 --- a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveBeginingRepository.cs +++ /dev/null @@ -1,587 +0,0 @@ -using Amazon.S3.Model; -using BMA.EHR.Application.Common.Interfaces; -using BMA.EHR.Application.Messaging; -using BMA.EHR.Application.Responses.Profiles; -using BMA.EHR.Domain.Extensions; -using BMA.EHR.Domain.Models.Leave.Commons; -using BMA.EHR.Domain.Models.Leave.Requests; -using BMA.EHR.Domain.Shared; -using Microsoft.AspNetCore.Http; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using System.Collections.Concurrent; - -namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests -{ - public class LeaveBeginningRepository : GenericLeaveRepository - { - #region " Fields " - - private readonly ILeaveDbContext _dbContext; - private readonly IHttpContextAccessor _httpContextAccessor; - private readonly OrganizationCommonRepository _organizationCommonRepository; - private readonly UserProfileRepository _userProfileRepository; - private readonly IConfiguration _configuration; - private readonly EmailSenderService _emailSenderService; - - /// - /// Keyed locks to serialize get-or-create for LeaveBeginning rows by (ProfileId, LeaveYear, LeaveTypeId). - /// Prevents duplicate inserts when concurrent requests (e.g. UI calling /user/check twice) hit the same key. - /// - private static readonly ConcurrentDictionary _getOrAddLocks = new(); - - #endregion - - #region " Constructor and Destuctor " - - public LeaveBeginningRepository(ILeaveDbContext dbContext, - IHttpContextAccessor httpContextAccessor, - OrganizationCommonRepository organizationCommonRepository, - UserProfileRepository userProfileRepository, - IConfiguration configuration, - EmailSenderService emailSenderService) : base(dbContext, httpContextAccessor) - { - _dbContext = dbContext; - _httpContextAccessor = httpContextAccessor; - _organizationCommonRepository = organizationCommonRepository; - _userProfileRepository = userProfileRepository; - _configuration = configuration; - _emailSenderService = emailSenderService; - } - - #endregion - - #region " Properties " - - protected Guid UserOrganizationId - { - get - { - if (UserId != null || UserId != "") - return _userProfileRepository.GetUserOCId(Guid.Parse(UserId!), AccessToken); - else - return Guid.Empty; - } - } - - #endregion - - public async Task> GetAllByYearAsync(int year) - { - return await _dbContext.Set() - .Include(x => x.LeaveType) - .Where(x => x.LeaveYear == year) - .ToListAsync(); - } - - public async Task GetByYearAndTypeIdAsync(int year, Guid typeId) - { - var data = await _dbContext.Set() - .Include(x => x.LeaveType) - .FirstOrDefaultAsync(x => x.LeaveYear == year && x.LeaveTypeId == typeId); - - - return data; - } - - public async Task UpdateLeaveUsageAsync(int year, Guid typeId, Guid userId, double day) - { - // var pf = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var pf = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); - if (pf == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - var data = await _dbContext.Set() - .Include(x => x.LeaveType) - .FirstOrDefaultAsync(x => x.LeaveYear == year && x.LeaveTypeId == typeId && x.ProfileId == pf.Id); - - if (data == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - data.LeaveDaysUsed += day; - - await _dbContext.SaveChangesAsync(); - } - - public async Task UpdateLeaveCountAsync(int year, Guid typeId, Guid userId, int count) - { - // var pf = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var pf = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); - if (pf == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - var data = await _dbContext.Set() - .Include(x => x.LeaveType) - .FirstOrDefaultAsync(x => x.LeaveYear == year && x.LeaveTypeId == typeId && x.ProfileId == pf.Id); - - if (data == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - data.LeaveCount += count; - - await _dbContext.SaveChangesAsync(); - } - - public async Task ProcessEarlyLeaveRequest(int year) - { - // Get Early Leave Request (กรองตามปีงบประมาณ: 1 ต.ค. (year-1) – 30 ก.ย. (year)) - var fiscalStart = new DateTime(year - 1, 10, 1); - var fiscalEnd = new DateTime(year, 9, 30); - - var leaveReq = await _dbContext.Set() - .Include(x => x.Type) - .Where(x => x.LeaveStatus == "APPROVE") - .Where(x => x.LeaveStartDate.Date <= fiscalEnd && x.LeaveEndDate.Date >= fiscalStart) - .ToListAsync(); - - foreach (var leave in leaveReq) - { - await GetByYearAndTypeIdForUserWithUpdateAsync(year, leave.Type.Id, leave.KeycloakUserId); - } - } - - public async Task ProcessEarlyLeaveRequestSchedule() - { - int year = DateTime.Now.Year; - await ProcessEarlyLeaveRequest(year); - } - - public async Task GetByYearAndTypeIdForUserAsync(int year, Guid typeId, Guid userId) - { - // var pf = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var pf = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); - if (pf == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - var govAge = (pf?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date); - - var leaveType = await _dbContext.Set().FirstOrDefaultAsync(x => x.Id == typeId); - - LeaveBeginning Factory() - { - var limit = 0.0; - - var prev = _dbContext.Set() - .Include(x => x.LeaveType) - .FirstOrDefault(x => x.LeaveYear == year - 1 && x.LeaveTypeId == typeId && x.ProfileId == pf.Id); - - // คำนวณปีงบประมาณจาก startDate (ปีงบประมาณเริ่ม 1 ต.ค. และสิ้นสุด 30 ก.ย.) - var isCurrentYear = DateTime.Now.Year == year; - - - var prevRemain = 0.0; - if (prev != null) - { - prevRemain = isCurrentYear ? prev.LeaveDays - (prev.LeaveDaysUsed ?? 0.0) : 0.0; - } - - if (govAge >= 180) - { - if (govAge >= 3650) - { - limit = 10 + prevRemain; - if (limit > 30) limit = 30; - } - else - { - limit = 10 + prevRemain; - if (limit > 20) limit = 20; - } - } - else - { - limit = 0.0; - } - - return new LeaveBeginning - { - LeaveYear = year, - LeaveTypeId = typeId, - ProfileId = pf.Id, - Prefix = pf.Prefix, - FirstName = pf.FirstName, - LastName = pf.LastName, - LeaveDaysUsed = 0, - LeaveDays = leaveType?.Code == "LV-005" ? limit : 0, - RootDnaId = pf.RootDnaId, - Child1DnaId = pf.Child1DnaId, - Child2DnaId = pf.Child2DnaId, - Child3DnaId = pf.Child3DnaId, - Child4DnaId = pf.Child4DnaId - }; - } - - return await GetOrAddForUserAsync(year, typeId, pf.Id, Factory); - } - - public async Task GetByYearAndTypeIdForUserWithUpdateAsync(int year, Guid typeId, Guid userId) - { - // var pf = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var pf = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); - if (pf == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - var govAge = (pf?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date); - - var leaveType = await _dbContext.Set().FirstOrDefaultAsync(x => x.Id == typeId); - - - var limit = 0.0; - - var prev = _dbContext.Set() - .Include(x => x.LeaveType) - .FirstOrDefault(x => x.LeaveYear == year - 1 && x.LeaveTypeId == typeId && x.ProfileId == pf.Id); - - var prevRemain = 0.0; - - - - if (prev != null) - { - prevRemain = prev.LeaveDays - (prev.LeaveDaysUsed ?? 0.0); - } - - if (govAge >= 180) - { - if (govAge >= 3650) - { - limit = 10 + prevRemain; - if (limit > 30) limit = 30; - } - else - { - limit = 10 + prevRemain; - if (limit > 20) limit = 20; - } - } - else - { - limit = 0.0; - } - - var data = await _dbContext.Set() - .Where(x => x.LeaveYear == year && x.LeaveTypeId == typeId && x.ProfileId == pf.Id) - .FirstOrDefaultAsync(); - - if (data != null) - { - data.LeaveDays = leaveType?.Code == "LV-005" ? limit : 0; - await _dbContext.SaveChangesAsync(); - } - - // return new LeaveBeginning - // { - // LeaveYear = year, - // LeaveTypeId = typeId, - // ProfileId = pf.Id, - // Prefix = pf.Prefix, - // FirstName = pf.FirstName, - // LastName = pf.LastName, - // LeaveDaysUsed = 0, - // LeaveDays = leaveType?.Code == "LV-005" ? limit : 0, - // RootDnaId = pf.RootDnaId, - // Child1DnaId = pf.Child1DnaId, - // Child2DnaId = pf.Child2DnaId, - // Child3DnaId = pf.Child3DnaId, - // Child4DnaId = pf.Child4DnaId - // }; - return data; - - } - - - public async Task GetByYearAndTypeIdForUser(int year, Guid typeId, GetProfileByKeycloakIdDto? pf) - { - var govAge = (pf?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date); - - var leaveType = await _dbContext.Set().FirstOrDefaultAsync(x => x.Id == typeId); - - LeaveBeginning Factory() - { - var limit = 0.0; - - var prev = _dbContext.Set() - .Include(x => x.LeaveType) - .FirstOrDefault(x => x.LeaveYear == year - 1 && x.LeaveTypeId == typeId && x.ProfileId == pf.Id); - - // คำนวณปีงบประมาณจาก startDate (ปีงบประมาณเริ่ม 1 ต.ค. และสิ้นสุด 30 ก.ย.) - var isCurrentYear = DateTime.Now.Year == year; - - var prevRemain = 0.0; - if (prev != null) - { - prevRemain = isCurrentYear ? prev.LeaveDays - (prev.LeaveDaysUsed ?? 0.0) : 0.0; - } - - if (govAge >= 180) - { - if (govAge >= 3650) - { - limit = 10 + prevRemain; - if (limit > 30) limit = 30; - } - else - { - limit = 10 + prevRemain; - if (limit > 20) limit = 20; - } - } - else - { - limit = 0.0; - } - - return new LeaveBeginning - { - LeaveYear = year, - LeaveTypeId = typeId, - ProfileId = pf.Id, - Prefix = pf.Prefix, - FirstName = pf.FirstName, - LastName = pf.LastName, - LeaveDaysUsed = 0, - LeaveDays = leaveType?.Code == "LV-005" ? limit : 0, - RootDnaId = pf.RootDnaId, - Child1DnaId = pf.Child1DnaId, - Child2DnaId = pf.Child2DnaId, - Child3DnaId = pf.Child3DnaId, - Child4DnaId = pf.Child4DnaId - }; - } - - return await GetOrAddForUserAsync(year, typeId, pf.Id, Factory); - } - - public async Task GetByYearAndTypeIdForUser2Async(int year, Guid typeId, Guid userId) - { - // var pf = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var pf = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); - if (pf == null) - { - return null; - } - - var govAge = (pf?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date); - - var leaveType = await _dbContext.Set().FirstOrDefaultAsync(x => x.Id == typeId); - - LeaveBeginning Factory() - { - var limit = 0.0; - - var prev = _dbContext.Set() - .Include(x => x.LeaveType) - .FirstOrDefault(x => x.LeaveYear == year - 1 && x.LeaveTypeId == typeId && x.ProfileId == pf.Id); - - // คำนวณปีงบประมาณจาก startDate (ปีงบประมาณเริ่ม 1 ต.ค. และสิ้นสุด 30 ก.ย.) - var isCurrentYear = DateTime.Now.Year == year; - - var prevRemain = 0.0; - if (prev != null) - { - prevRemain = isCurrentYear ? prev.LeaveDays - (prev.LeaveDaysUsed ?? 0.0) : 0.0; - } - - if (govAge >= 180) - { - if (govAge >= 3650) - { - limit = 10 + prevRemain; - if (limit > 30) limit = 30; - } - else - { - limit = 10 + prevRemain; - if (limit > 20) limit = 20; - } - } - else - { - limit = 0.0; - } - - return new LeaveBeginning - { - LeaveYear = year, - LeaveTypeId = typeId, - ProfileId = pf.Id, - Prefix = pf.Prefix, - FirstName = pf.FirstName, - LastName = pf.LastName, - LeaveDaysUsed = 0, - LeaveDays = leaveType?.Code == "LV-005" ? limit : 0, - RootDnaId = pf.RootDnaId, - Child1DnaId = pf.Child1DnaId, - Child2DnaId = pf.Child2DnaId, - Child3DnaId = pf.Child3DnaId, - Child4DnaId = pf.Child4DnaId - }; - } - - return await GetOrAddForUserAsync(year, typeId, pf.Id, Factory); - } - - /// - /// Get-or-create a LeaveBeginning row for (ProfileId, LeaveYear, LeaveTypeId) with concurrency protection. - /// Uses a keyed SemaphoreSlim to serialize within-process requests, and re-queries after acquiring the lock. - /// If a cross-process insert wins (unique index violation), the duplicate key exception is caught and the row - /// created by the winner is returned. - /// - private async Task GetOrAddForUserAsync(int year, Guid typeId, Guid profileId, Func factory) - { - var key = $"{profileId}_{year}_{typeId}"; - var semaphore = _getOrAddLocks.GetOrAdd(key, _ => new SemaphoreSlim(1, 1)); - await semaphore.WaitAsync(); - try - { - // Re-query inside the lock — another thread may have created it while we waited. - var existing = await _dbContext.Set() - .Include(x => x.LeaveType) - .FirstOrDefaultAsync(x => x.LeaveYear == year && x.LeaveTypeId == typeId && x.ProfileId == profileId); - if (existing != null) - { - return existing; - } - - var entity = factory(); - _dbContext.Set().Add(entity); - try - { - await _dbContext.SaveChangesAsync(); - return entity; - } - catch (DbUpdateException) - { - // Cross-process/cross-server race hit the unique index (IX_LeaveBeginnings_ProfileId_LeaveYear_LeaveTypeId). - // Detach the failed insert and return the row created by the winner. - _dbContext.Detach(entity); - var winner = await _dbContext.Set() - .Include(x => x.LeaveType) - .FirstOrDefaultAsync(x => x.LeaveYear == year && x.LeaveTypeId == typeId && x.ProfileId == profileId); - return winner; - } - } - finally - { - semaphore.Release(); - } - } - - public async Task> GetAllByYearAndTypeAsync(int year, Guid typeId, List userIdList) - { - - var updateList = new List(); - var result = new List(); - - var beginningList = await _dbContext.Set() - .Include(x => x.LeaveType) - .Where(x => x.LeaveYear == year && x.LeaveTypeId == typeId) - .ToListAsync(); - - foreach (var pf in userIdList) - { - //var pf = await _userProfileRepository.GetProfileByKeycloakIdAsync(id, AccessToken); - //if (pf == null) - //{ - // continue; // Goto Next Id - //} - - var profile = await _userProfileRepository.GetProfileByProfileIdAsync(pf.Id, AccessToken); - if (profile == null) - { - return null; - } - - var govAge = (pf?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date); - - var leaveType = await _dbContext.Set().FirstOrDefaultAsync(x => x.Id == typeId); - - var data = beginningList.FirstOrDefault(x => x.ProfileId == pf.Id); - - if (data == null) - { - var limit = 0.0; - - var prev = await _dbContext.Set() - .Include(x => x.LeaveType) - .FirstOrDefaultAsync(x => x.LeaveYear == year - 1 && x.LeaveTypeId == typeId && x.ProfileId == pf.Id); - - var prevRemain = 0.0; - if (prev != null) - { - prevRemain = prev.LeaveDays - (prev.LeaveDaysUsed ?? 0.0); - } - - if (govAge >= 180) - { - if (govAge >= 3650) - { - limit = 10 + prevRemain; - if (limit > 30) limit = 30; - } - else - { - limit = 10 + prevRemain; - if (limit > 20) limit = 20; - } - } - else - { - limit = 0.0; - } - - data = new LeaveBeginning - { - LeaveYear = year, - LeaveTypeId = typeId, - ProfileId = pf.Id, - Prefix = pf.Prefix, - FirstName = pf.FirstName, - LastName = pf.LastName, - LeaveDaysUsed = 0, - LeaveDays = leaveType?.Code == "LV-005" ? limit : 0, - RootDnaId = profile.RootDnaId, - Child1DnaId = profile.Child1DnaId, - Child2DnaId = profile.Child2DnaId, - Child3DnaId = profile.Child3DnaId, - Child4DnaId = profile.Child4DnaId - }; - - updateList.Add(data); - } - result.Add(data); - } - if (!updateList.Any()) - { - await _dbContext.Set().AddRangeAsync(updateList); - await _dbContext.SaveChangesAsync(); - } - return result; - } - } - - public class ProfileData - { - public Guid Id { get; set; } = Guid.Empty; - - public string Prefix { get; set; } = string.Empty; - - public string FirstName { get; set; } = string.Empty; - - public string LastName { get; set; } = string.Empty; - - public DateTime? DateStart { get; set; } = null; - - public DateTime? DateAppoint { get; set; } = null; - } -} diff --git a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs index 6363e258..bdd93692 100644 --- a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs @@ -1,6 +1,10 @@ -using BMA.EHR.Application.Common.Interfaces; +using System.Drawing; +using System.Net.Http.Headers; +using System.Net.Http.Json; +using BMA.EHR.Application.Common.Interfaces; using BMA.EHR.Application.Messaging; using BMA.EHR.Application.Responses.Leaves; +using BMA.EHR.Domain.Models.HR; using BMA.EHR.Domain.Models.Leave.Commons; using BMA.EHR.Domain.Models.Leave.Requests; using BMA.EHR.Domain.Models.Notifications; @@ -8,11 +12,6 @@ using BMA.EHR.Domain.Shared; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; -using System.IO.Compression; -using System.Net.Http.Headers; -using System.Net.Http.Json; -using BMA.EHR.Application.Repositories.Leaves.TimeAttendants; -using BMA.EHR.Domain.Models.Leave.TimeAttendants; namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests { @@ -28,12 +27,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests private readonly EmailSenderService _emailSenderService; private readonly IApplicationDBContext _appDbContext; - private readonly MinIOLeaveService _minIOService; - - private readonly LeaveBeginningRepository _leaveBeginningRepository; - private readonly ProcessUserTimeStampRepository _processUserTimeStampRepository; - - private readonly string URL = string.Empty; #endregion @@ -45,10 +38,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests UserProfileRepository userProfileRepository, IConfiguration configuration, EmailSenderService emailSenderService, - IApplicationDBContext appDbContext, - MinIOLeaveService minIOService, - LeaveBeginningRepository leaveBeginningRepository, - ProcessUserTimeStampRepository processUserTimeStampRepository) : base(dbContext, httpContextAccessor) + IApplicationDBContext appDbContext) : base(dbContext, httpContextAccessor) { _dbContext = dbContext; _httpContextAccessor = httpContextAccessor; @@ -57,12 +47,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests _configuration = configuration; _emailSenderService = emailSenderService; _appDbContext = appDbContext; - - URL = (_configuration["VITE_URL_MGT"]).Replace("/api/v1", ""); - Console.WriteLine($"URL : {URL}"); - _minIOService = minIOService; - _leaveBeginningRepository = leaveBeginningRepository; - _processUserTimeStampRepository = processUserTimeStampRepository; } #endregion @@ -90,7 +74,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests { var data = await _dbContext.Set().AsQueryable() //.AsNoTracking() - .Include(x => x.Approvers) .Include(x => x.LeaveDocument) .ThenInclude(x => x.Document) .Include(x => x.LeaveDraftDocument) @@ -103,11 +86,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests public override async Task GetByIdAsync(Guid id) { - try - { - var data = await _dbContext.Set().AsQueryable() + var data = await _dbContext.Set().AsQueryable() .AsNoTracking() - .Include(x => x.Approvers) .Include(x => x.LeaveDocument) .ThenInclude(x => x.Document) .Include(x => x.LeaveDraftDocument) @@ -115,13 +95,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Include(x => x.Type) .FirstOrDefaultAsync(x => x.Id == id); - return data; - } - catch - { - throw; - } - + return data; } public override async Task AddAsync(LeaveRequest entity) @@ -209,70 +183,10 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests #endregion - public async Task AddLeaveDocumentAsync(Guid id, LeaveDocument doc) + public async Task> GetLeaveRequestByYearAsync(int year) { - try - { - var req = await _dbContext.Set().FirstOrDefaultAsync(x => x.Id == id); - req!.LeaveDocument.Add(doc); - await _dbContext.SaveChangesAsync(); - } - catch - { - throw; - } - } - - public async Task AddApproversAsync(Guid id, List approvers) - { - try - { - var req = await _dbContext.Set().FirstOrDefaultAsync(x => x.Id == id); - req!.Approvers.AddRange(approvers); - await _dbContext.SaveChangesAsync(); - } - catch - { - throw; - } - } - - public async Task RemoveApproversAsync(Guid id, string type) - { - try - { - var data = await _dbContext.Set() - .Where(x => x.LeaveRequest.Id == id && x.ApproveType.ToUpper() == type.ToUpper()) - .ToListAsync(); - - _dbContext.Set().RemoveRange(data); - - await _dbContext.SaveChangesAsync(); - } - catch - { - throw; - } - } - - - public async Task> GetLeaveRequestByYearAsync(int year, Guid userId) - { - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); - - if (profile == null) - { - throw new Exception("ไม่พบข้อมูลผู้ใช้งานในระบบทะเบียนประวัติ!!"); - } - var data = await _dbContext.Set().AsQueryable().AsNoTracking() .Include(x => x.Type) - .Where(x => x.RootId == profile.RootId && - x.Child1Id == profile.Child1Id && - x.Child2Id == profile.Child2Id && - x.Child3Id == profile.Child3Id && - x.Child4Id == profile.Child4Id) .Where(x => x.LeaveStartDate.Year == year) .Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE") .ToListAsync(); @@ -280,57 +194,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests return data; } - public async Task> GetLeaveRequestByYearForAdminAsync(int year, string role, string? nodeId, int? node) - { - var rawData = _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE"); - //.ToListAsync(); - if (year != 0) - { - var startFiscalDate = new DateTime(year - 1, 10, 1); - var endFiscalDate = new DateTime(year, 9, 30); - rawData = rawData.Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate); - } - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - rawData = rawData - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))); - } - else if (role == "BROTHER") - { - rawData = rawData - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true))))); - } - else if (role == "ROOT") - { - rawData = rawData - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)); - } - // else if (role == "PARENT") - // { - // rawData = rawData - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null); - // } - else if (role == "NORMAL") - { - rawData = rawData - .Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : true); - } - - return await rawData.ToListAsync(); - } - public async Task> GetLeaveRequestByUserIdAsync(Guid keycloakUserId, int year, Guid type, string status) { var rawData = _dbContext.Set().AsQueryable().AsNoTracking() @@ -338,12 +201,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Where(x => x.KeycloakUserId == keycloakUserId); if (year != 0) - { - var startFiscalDate = new DateTime(year - 1, 10, 1); - var endFiscalDate = new DateTime(year, 9, 30); - rawData = rawData.Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate); - } - //rawData = rawData.Where(x => x.LeaveStartDate.Year == year); + rawData = rawData.Where(x => x.LeaveStartDate.Year == year); if (type != Guid.Empty) rawData = rawData.Where(x => x.Type.Id == type); @@ -359,100 +217,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests var rawData = _dbContext.Set().AsNoTracking() .Include(x => x.Type) .Where(x => x.LeaveStatus != "DRAFT") - .OrderByDescending(x => (x.DateSendLeave ?? x.CreatedAt)) - .AsQueryable(); - - if (year != 0) - rawData = rawData.Where(x => x.LeaveStartDate.Year == year); - - if (type != Guid.Empty) - rawData = rawData.Where(x => x.Type.Id == type); - - if (status.Trim().ToUpper() != "ALL") - rawData = rawData.Where(x => x.LeaveStatus == status); - - if (startDate != DateTime.MinValue) - rawData = rawData.Where(x => x.LeaveStartDate >= startDate); - - if (endDate != DateTime.MinValue) - rawData = rawData.Where(x => x.LeaveEndDate <= endDate); - - return await rawData.ToListAsync(); - } - - public async Task> GetListLeaveRequestForAdminAsync(int year, Guid type, string status, DateTime startDate, DateTime endDate, string role, string? nodeId, int? node) - { - var rawData = _dbContext.Set().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.LeaveStatus != "DRAFT") - .OrderByDescending(x => (x.DateSendLeave ?? x.CreatedAt)) - .AsQueryable(); - // fix issue : 1830 - if (year != 0) - { - var startFiscalDate = new DateTime(year - 1, 10, 1); - var endFiscalDate = new DateTime(year, 9, 30); - rawData = rawData.Where(x => x.LeaveStartDate >= startFiscalDate && x.LeaveStartDate <= endFiscalDate); - } - - if (type != Guid.Empty) - rawData = rawData.Where(x => x.Type.Id == type); - - if (status.Trim().ToUpper() != "ALL") - rawData = rawData.Where(x => x.LeaveStatus == status); - - if (startDate != DateTime.MinValue) - rawData = rawData.Where(x => x.LeaveStartDate >= startDate); - - if (endDate != DateTime.MinValue) - rawData = rawData.Where(x => x.LeaveEndDate <= endDate); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - rawData = rawData - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))); - } - else if (role == "BROTHER") - { - rawData = rawData - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true))))); - } - else if (role == "ROOT") - { - rawData = rawData - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)); - } - // else if (role == "PARENT") - // { - // rawData = rawData - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null); - // } - else if (role == "NORMAL") - { - rawData = rawData - .Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : true); - } - - - return await rawData.ToListAsync(); - } - - public async Task> GetLeaveRequestForAdminWithAuthAsync(int year, Guid type, string status, DateTime startDate, DateTime endDate, List keycloakIdList) - { - var rawData = _dbContext.Set().AsNoTracking() - .Include(x => x.Type) - .Where(x => keycloakIdList.Contains(x.KeycloakUserId)) - .Where(x => x.LeaveStatus != "DRAFT") - .OrderByDescending(x =>(x.DateSendLeave ?? x.CreatedAt)) + .OrderByDescending(x => x.CreatedAt) .AsQueryable(); if (year != 0) @@ -475,10 +240,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests public async Task GetRestDayTotalByYearForUserAsync(Guid keycloakUserId, int year) { - var startFiscalDate = new DateTime(year - 1, 10, 1); - var endFiscalDate = new DateTime(year, 9, 30); - - var leaveType = await _dbContext.Set().AsQueryable().AsNoTracking() .FirstOrDefaultAsync(l => l.Code.Trim().ToUpper() == "LV-005"); @@ -491,9 +252,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Include(x => x.Type) .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveType.Id) - //.Where(x => x.LeaveStartDate.Year == year) - .Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") + .Where(x => x.LeaveStartDate.Year == year) + .Where(x => x.LeaveStatus == "APPROVE") .Sum(x => x.LeaveTotal); return data; @@ -501,33 +261,16 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests public async Task GetSumLeaveByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId, int year) { - // var pf = await _userProfileRepository.GetProfileByKeycloakIdAsync(keycloakUserId, AccessToken); - var pf = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(keycloakUserId, AccessToken); - if (pf == null) - throw new Exception(GlobalMessages.DataNotFound); - - var beginningLeave = await _dbContext.Set().AsNoTracking() - .Where(x => x.ProfileId == pf.Id) - .Where(x => x.LeaveYear == year) - .Where(x => x.LeaveTypeId == leaveTypeId) - .FirstOrDefaultAsync(); - - - - var startFiscalDate = new DateTime(year - 1, 10, 1); - var endFiscalDate = new DateTime(year, 9, 30); - var data = await _dbContext.Set().AsQueryable().AsNoTracking() .Include(x => x.Type) .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveTypeId) - //.Where(x => x.LeaveStartDate.Year == year) - .Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") + .Where(x => x.LeaveStartDate.Year == year) + .Where(x => x.LeaveStatus == "APPROVE") //.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE") .ToListAsync(); - return data.Sum(x => x.LeaveTotal) + (beginningLeave == null ? 0 : (beginningLeave.LeaveDaysUsed ?? 0.0)); + return data.Sum(x => x.LeaveTotal); } //public async Task GetSumApproveLeaveByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId, int year) @@ -549,7 +292,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Include(x => x.Type) .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveTypeId) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") + .Where(x => x.LeaveStatus == "APPROVE") //.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE") .OrderByDescending(x => x.LeaveStartDate.Date) .Select(x => x.LeaveStartDate.Date) @@ -558,15 +301,13 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests return data; } - public async Task GetLastLeaveRequestByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId, DateTime beforeDate) + public async Task GetLastLeaveRequestByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId) { var data = await _dbContext.Set().AsQueryable().AsNoTracking() .Include(x => x.Type) - .Where(x => x.LeaveStartDate.Date < beforeDate.Date) - //.Where(x => x.CreatedAt < beforeDate) .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveTypeId) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") + .Where(x => x.LeaveStatus == "APPROVE") //.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE") .OrderByDescending(x => x.LeaveStartDate.Date) .FirstOrDefaultAsync(); @@ -574,37 +315,15 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests return data; } - public async Task GetLastLeaveRequestByTypeForUserAsync2(Guid keycloakUserId, Guid leaveTypeId, DateTime beforeDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - //.Where(x => x.LeaveStartDate.Date < beforeDate.Date) - .Where(x => (x.DateSendLeave ?? x.CreatedAt) < beforeDate) - .Where(x => x.KeycloakUserId == keycloakUserId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - //.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE") - .OrderByDescending(x => (x.DateSendLeave ?? x.CreatedAt)) - .FirstOrDefaultAsync(); - - return data; - } - - public async Task> GetCancelLeaveRequestForAdminAsync(int year, Guid type, string status, string role, string? nodeId, int? node) + public async Task> GetCancelLeaveRequestForAdminAsync(int year, Guid type, string status) { var rawData = _dbContext.Set().AsNoTracking() .Include(x => x.Type) - .Where(x => x.LeaveStatus == "DELETE" || x.LeaveStatus == "DELETING") + .Where(x => x.LeaveStatus == "DELETE") .AsQueryable(); - // if (year != 0) - // rawData = rawData.Where(x => x.LeaveStartDate.Year == year); if (year != 0) - { - var startFiscalDate = new DateTime(year - 1, 10, 1); - var endFiscalDate = new DateTime(year, 9, 30); - rawData = rawData.Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate); - } + rawData = rawData.Where(x => x.LeaveStartDate.Year == year); if (type != Guid.Empty) rawData = rawData.Where(x => x.Type.Id == type); @@ -612,96 +331,22 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests if (status.Trim().ToUpper() != "ALL") rawData = rawData.Where(x => x.LeaveCancelStatus == status); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - rawData = rawData - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))); - } - else if (role == "BROTHER") - { - rawData = rawData - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true))))); - } - else if (role == "ROOT") - { - rawData = rawData - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)); - } - // else if (role == "PARENT") - // { - // rawData = rawData - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null); - // } - else if (role == "NORMAL") - { - rawData = rawData - .Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : true); - } - return await rawData.ToListAsync(); } - public async Task ApproveCancelLeaveRequestAsync(LeaveRequest data, string Reason, string LeaveReason) + public async Task ApproveCancelLeaveRequestAsync(LeaveRequest data, string Reason) { try { - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken ?? ""); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(data.KeycloakUserId, AccessToken ?? ""); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken ?? ""); if (profile == null) { throw new Exception(GlobalMessages.DataNotFound); } - // ปรับสถานะ จาก DELETING มาเป็น DELETE - data.LeaveStatus = "DELETE"; - data.LeaveCancelStatus = "APPROVE"; - data.LeaveDirectorComment = Reason; - data.LeaveCancelComment = LeaveReason; - - // TODO : Update ไปตาราง beginning - if (data.ApproveStep == "st4") // ถ้ามีการอนุมัติจากผู้มีอำนาจแล้ว - { - - var toDay = data.LeaveStartDate.Date; - var thisYear = data.LeaveStartDate.Year; - if (toDay >= new DateTime(thisYear, 10, 1) && toDay <= new DateTime(thisYear, 12, 31)) - { - thisYear = thisYear + 1; - } - await _leaveBeginningRepository.UpdateLeaveUsageAsync(thisYear, data.Type.Id, data.KeycloakUserId, -1 * data.LeaveTotal); - // update leave count ลดลง 1 ครั้ง - await _leaveBeginningRepository.UpdateLeaveCountAsync(thisYear, data.Type.Id, data.KeycloakUserId, -1); - - - var _baseAPI = _configuration["API"]; - var apiUrlSalary = $"{_baseAPI}/org/profile/leave/cancel/{data.Id}"; - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - - var request = new HttpRequestMessage(HttpMethod.Patch, apiUrlSalary); - - // ส่ง request - var _res = await client.SendAsync(request); - if (!_res.IsSuccessStatusCode) - throw new Exception("ไม่สามารถอัพเดตการยกเลิกรายการลาไปยังระบบทะเบียนประวัติ"); - //var _result = await _res.Content.ReadAsStringAsync(); - } - } - + data.LeaveCancelComment = Reason; // Send Noti var noti = new Notification @@ -732,55 +377,20 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests throw new Exception(GlobalMessages.DataNotFound); } - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken ?? ""); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(rawData.KeycloakUserId, AccessToken ?? ""); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken ?? ""); if (profile == null) { throw new Exception(GlobalMessages.DataNotFound); } - rawData.LeaveStatus = "DELETE"; - rawData.LeaveCancelStatus = "APPROVE"; - rawData.LeaveDirectorComment = Reason; + rawData.LeaveCancelComment = Reason; - await UpdateWithTrackingAsync(rawData); - - // TODO : Update ไปตาราง beginning - if (rawData.ApproveStep == "st4") // ถ้ามีการอนุมัติจากผู้มีอำนาจแล้ว - { - - var toDay = rawData.LeaveStartDate.Date; - var thisYear = rawData.LeaveStartDate.Year; - if (toDay >= new DateTime(thisYear, 10, 1) && toDay <= new DateTime(thisYear, 12, 31)) - { - thisYear = thisYear + 1; - } - - await _leaveBeginningRepository.UpdateLeaveUsageAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId, -1 * rawData.LeaveTotal); - // update leave count ลดลง 1 ครั้ง - await _leaveBeginningRepository.UpdateLeaveCountAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId, -1); - - var _baseAPI = _configuration["API"]; - var apiUrlSalary = $"{_baseAPI}/org/profile/leave/cancel/{rawData.Id}"; - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - - var request = new HttpRequestMessage(HttpMethod.Patch, apiUrlSalary); - - // ส่ง request - var _res = await client.SendAsync(request); - if (!_res.IsSuccessStatusCode) - throw new Exception("ไม่สามารถอัพเดตการยกเลิกรายการลาไปยังระบบทะเบียนประวัติ"); - //var _result = await _res.Content.ReadAsStringAsync(); - } - } + await UpdateAsync(rawData); // TODO: remove วันลา - // Send Noti หาเจ้าของใบลา + // Send Noti var noti = new Notification { Body = $"การขอยกเลิกใบลาของคุณได้รับการอนุมัติ", @@ -789,28 +399,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests Payload = "", }; _appDbContext.Set().Add(noti); - - var commanders = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "COMMANDER") - .OrderBy(x => x.Seq) - .ToList(); - - foreach (var commander in commanders) - { - var noti1 = new Notification - { - Body = $"การขอยกเลิกใบลาของ {rawData.FirstName} {rawData.LastName} ได้รับการอนุมัติแล้ว", - ReceiverUserId = commander.ProfileId, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti1); - } - - await _appDbContext.SaveChangesAsync(); - - } public async Task RejectCancelLeaveRequestAsync(Guid id, string Reason) @@ -821,15 +410,14 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests throw new Exception(GlobalMessages.DataNotFound); } - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken ?? ""); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(rawData.KeycloakUserId, AccessToken ?? ""); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken ?? ""); if (profile == null) { throw new Exception(GlobalMessages.DataNotFound); } rawData.LeaveCancelStatus = "REJECT"; - rawData.LeaveDirectorComment = Reason; + rawData.LeaveCancelComment = Reason; // fix issue : ระบบลา (User) >> กรณีขอยกเลิกการลา แต่ผู้บังคับบัญชาไม่อนุมัติ (สถานะการลาไม่อัปเดต) #846 if (rawData.ApproveStep == "st4") @@ -871,25 +459,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests Payload = "", }; _appDbContext.Set().Add(noti); - - var commanders = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "COMMANDER") - .OrderBy(x => x.Seq) - .ToList(); - - foreach (var commander in commanders) - { - var noti1 = new Notification - { - Body = $"การขอยกเลิกใบลาของ {rawData.FirstName} {rawData.LastName} ไม่ได้รับการอนุมัติ \r\nเนืองจาก {Reason}", - ReceiverUserId = commander.ProfileId, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti1); - } - - await _appDbContext.SaveChangesAsync(); } @@ -909,7 +478,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests rawData.LeaveStatus = "NEW"; - rawData.DateSendLeave = DateTime.Now; // Update วันที่ยื่นลาเป็นวันที่ปัจจุบัน //rawData.ApproveStep = "st2"; await UpdateAsync(rawData); @@ -927,56 +495,11 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests rawData.ApproveStep = "st2"; await UpdateAsync(rawData); - - // TODO: Send notification to 1st Commander - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "COMMANDER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - - // fix: If no commander, skip notification - if (firstCommander != null) - { - // Send Notification - var noti1 = new Notification - { - Body = $"การขอลาของคุณ {rawData.FirstName} {rawData.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/leave/detail/{id}", - }; - _appDbContext.Set().Add(noti1); - } - else - { - // มีแต่ approver อย่างเดียว - var firstApprover = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - if(firstApprover != null) - { - // Send Notification - var noti2 = new Notification - { - Body = $"การขอลาของคุณ {rawData.FirstName} {rawData.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstApprover!.ProfileId, - Type = "", - Payload = $"{URL}/leave/detail/{id}", - }; - _appDbContext.Set().Add(noti2); - } - } - await _appDbContext.SaveChangesAsync(); } public async Task CommanderApproveLeaveRequest(Guid id, string reason) { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - - var rawData = await GetByIdWithTrackingAsync(id); + var rawData = await GetByIdAsync(id); if (rawData == null) { throw new Exception(GlobalMessages.DataNotFound); @@ -984,522 +507,160 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests if (rawData.ApproveStep != "st2") { - throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); + throw new Exception("คำขอนี้ยังไม่ได้รับการอนุมัติจากเจ้าหน้าที่ ไม่สามารถทำรายการได้"); } - // check commander approve - //var approvers = await _dbContext.Set() - // //.AsNoTracking() - // .Include(x => x.LeaveRequest) - // .Where(x => x.LeaveRequest.Id == id && x.ApproveType == "COMMANDER") - // .OrderBy(x => x.Seq) - // .ToListAsync(); - - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - var maxSeq = approvers.Max(x => x.Seq); - - //var data = await _dbContext.Set() - // .AsNoTracking() - // .Include(x => x.LeaveRequest) - // .Where(x => x.LeaveRequest.Id == id && x.KeycloakId == userId && x.ApproveType == "COMMANDER") - // .FirstOrDefaultAsync(); - - //if(data != null) - //{ - // data.ApproveStatus = "APPROVE"; - // data.Comment = reason; - - // data.LastUpdatedAt = DateTime.Now; - // data.LastUpdateUserId = userId.ToString("D"); - // data.LastUpdateFullName = FullName ?? ""; - - // await _appDbContext.SaveChangesAsync(); - //} - - approver.ApproveStatus = "APPROVE"; - approver.Comment = reason; - approver.LastUpdateFullName = FullName ?? ""; - approver.LastUpdateUserId = userId.ToString("D"); - approver.LastUpdatedAt = DateTime.Now; - //await _dbContext.SaveChangesAsync(); - - if (approver.Seq != maxSeq) - { - rawData.LeaveStatus = "PENDING"; - await UpdateWithTrackingAsync(rawData); - - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - - // Send Noti - var noti = new Notification - { - Body = $"การขอลาของคุณ {rawData.FirstName} {rawData.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = $"{URL}/leave/detail/{id}", - }; - _appDbContext.Set().Add(noti); - await _appDbContext.SaveChangesAsync(); - } - else - { - rawData.LeaveStatus = "PENDING"; - rawData.LeaveComment = reason; - rawData.ApproveStep = "st3"; - - await UpdateWithTrackingAsync(rawData); - - // TODO: Send notification to 1st Approver - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - - // Send Notification - var noti1 = new Notification - { - Body = $"การขอลาของคุณ {rawData.FirstName} {rawData.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/leave/detail/{id}", - }; - _appDbContext.Set().Add(noti1); - await _appDbContext.SaveChangesAsync(); - } - } - - public async Task CommanderRejectLeaveRequest(Guid id, string reason) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - - var rawData = await GetByIdWithTrackingAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - if (rawData.ApproveStep != "st2") - { - throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "REJECT"; - approver.Comment = reason; - approver.LastUpdateFullName = FullName ?? ""; - approver.LastUpdateUserId = userId.ToString("D"); - approver.LastUpdatedAt = DateTime.Now; - if (approver.Seq != maxSeq) - { - - - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti = new Notification - { - Body = $"การขอลาของคุณ {rawData.FirstName} {rawData.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = $"{URL}/leave/detail/{id}", - }; - _appDbContext.Set().Add(noti); - await _appDbContext.SaveChangesAsync(); - - rawData.LeaveStatus = "PENDING"; - await UpdateWithTrackingAsync(rawData); - } - else - { - rawData.LeaveStatus = "PENDING"; - rawData.LeaveComment = reason; - rawData.ApproveStep = "st3"; - - await UpdateWithTrackingAsync(rawData); - - // TODO: Send notification to 1st Approver - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var noti1 = new Notification - { - Body = $"การขอลาของคุณ {rawData.FirstName} {rawData.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/leave/detail/{id}", - }; - _appDbContext.Set().Add(noti1); - await _appDbContext.SaveChangesAsync(); - } + rawData.LeaveStatus = "PENDING"; + rawData.LeaveComment = reason; + rawData.ApproveStep = "st3"; + await UpdateAsync(rawData); } public async Task ApproveLeaveRequest(Guid id, string reason) { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var rawData = await GetByIdWithTrackingAsync(id); + var rawData = await GetByIdAsync(id); if (rawData == null) { throw new Exception(GlobalMessages.DataNotFound); } - // ถ้าไม่มี commander ข้ามไปเช็ค approver ได้เลย - var commanders = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "COMMANDER") - .OrderBy(x => x.Seq) - .ToList(); - if (commanders.Count > 0 && commanders != null) + if (rawData.ApproveStep != "st3") { - if (rawData.ApproveStep != "st3") + throw new Exception("คำขอนี้ยังไม่ได้รับการอนุมัติจากผู้บังคับบัญชา ไม่สามารถทำรายการได้"); + } + + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken); + if (profile == null) + { + throw new Exception(GlobalMessages.DataNotFound); + } + + rawData.LeaveStatus = "APPROVE"; + rawData.LeaveDirectorComment = reason; + rawData.ApproveStep = "st4"; + + await UpdateAsync(rawData); + + //var leaveType = await _appDbContext.Set() + // .FirstOrDefaultAsync(x => x.Name == rawData.Type.Name); + + + // insert to profile leave + // var profileLeave = new ProfileLeave + // { + // DateStartLeave = rawData.LeaveStartDate, + // DateEndLeave = rawData.LeaveEndDate, + + // TotalLeave = rawData.LeaveTotal, + // Status = "approve", + // Reason = rawData.LeaveDetail, + + // ProfileId = profile.Id, // change from profile object to id + // TypeLeave = leaveType + // }; + // _appDbContext.Set().Add(profileLeave); + var _baseAPI = _configuration["API"]; + var apiUrlSalary = string.Empty; + if (profile.ProfileType == "OFFICER") + { + apiUrlSalary = $"{_baseAPI}/org/profile/leave"; + using (var client = new HttpClient()) { - throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlSalary, new + { + profileId = profile.Id, + leaveTypeId = rawData?.Type?.Id ?? null, + dateLeaveStart = rawData.LeaveStartDate, + dateLeaveEnd = rawData.LeaveEndDate, + totalLeave = 0,//หน้า fe ไม่ได้ใช้ + leaveCount = 0,//หน้า fe ไม่ได้ใช้ + leaveDays = rawData.LeaveTotal, + status = "approve", + reason = rawData.LeaveDetail, + }); + // var _result = await _res.Content.ReadAsStringAsync(); } } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) + else if (profile.ProfileType == "EMPLOYEE") { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") + apiUrlSalary = $"{_baseAPI}/org/profile-employee/leave"; + using (var client = new HttpClient()) { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlSalary, new + { + profileEmployeeId = profile.Id, + leaveTypeId = rawData?.Type?.Id ?? null, + dateLeaveStart = rawData.LeaveStartDate, + dateLeaveEnd = rawData.LeaveEndDate, + totalLeave = 0, + leaveCount = 0, + leaveDays = rawData.LeaveTotal, + status = "approve", + reason = rawData.LeaveDetail, + }); } } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "APPROVE"; - approver.Comment = reason; - approver.LastUpdateFullName = FullName ?? ""; - approver.LastUpdateUserId = userId.ToString("D"); - approver.LastUpdatedAt = DateTime.Now; - if (approver.Seq != maxSeq) - { - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti1 = new Notification - { - Body = $"การขอลาของคุณ {rawData.FirstName} {rawData.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti1); - await _appDbContext.SaveChangesAsync(); - - await UpdateWithTrackingAsync(rawData); - } else { - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(rawData.KeycloakUserId, AccessToken); - if (profile == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - rawData.LeaveStatus = "APPROVE"; - rawData.LeaveDirectorComment = reason; - rawData.ApproveStep = "st4"; - - await UpdateWithTrackingAsync(rawData); - - var toDay = rawData.LeaveStartDate.Date; - var thisYear = rawData.LeaveStartDate.Year; - if (toDay >= new DateTime(thisYear, 10, 1) && toDay <= new DateTime(thisYear, 12, 31)) - { - thisYear = thisYear + 1; - } - - // TODO : Update ไปตาราง beginning - await _leaveBeginningRepository.UpdateLeaveUsageAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId, rawData.LeaveTotal); - // update leave count เพิ่มขึ้น 1 ครั้ง - await _leaveBeginningRepository.UpdateLeaveCountAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId, 1); - - - var _baseAPI = _configuration["API"]; - var apiUrlSalary = string.Empty; - if (profile.ProfileType == "OFFICER") - { - apiUrlSalary = $"{_baseAPI}/org/profile/leave"; - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var _res = await client.PostAsJsonAsync(apiUrlSalary, new - { - profileId = profile.Id, - leaveTypeId = rawData?.Type?.Id ?? null, - dateLeaveStart = rawData.LeaveStartDate, - dateLeaveEnd = rawData.LeaveEndDate, - totalLeave = 0,//หน้า fe ไม่ได้ใช้ - leaveCount = 0,//หน้า fe ไม่ได้ใช้ - leaveDays = rawData.LeaveTotal, - status = "approve", - reason = rawData.LeaveDetail, - leaveId = rawData.Id, - leaveSubTypeName = rawData.LeaveSubTypeName, - coupleDayLevelCountry = rawData.CoupleDayLevelCountry, - }); - // var _result = await _res.Content.ReadAsStringAsync(); - } - } - else if (profile.ProfileType == "EMPLOYEE") - { - apiUrlSalary = $"{_baseAPI}/org/profile-employee/leave"; - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var _res = await client.PostAsJsonAsync(apiUrlSalary, new - { - profileEmployeeId = profile.Id, - leaveTypeId = rawData?.Type?.Id ?? null, - dateLeaveStart = rawData.LeaveStartDate, - dateLeaveEnd = rawData.LeaveEndDate, - totalLeave = 0, - leaveCount = 0, - leaveDays = rawData.LeaveTotal, - status = "approve", - reason = rawData.LeaveDetail, - leaveId = rawData.Id, - leaveSubTypeName = rawData.LeaveSubTypeName, - coupleDayLevelCountry = rawData.CoupleDayLevelCountry, - }); - } - } - else - { - throw new Exception("ไม่สามารถทำรายการได้"); - } - await _appDbContext.SaveChangesAsync(); - - // ปรับสถานะการลงเวลา - if (rawData.LeaveStartDate.Date == rawData.LeaveEndDate.Date) - { - var processCheckIn = await _dbContext.Set() - .Where(x => x.KeycloakUserId == rawData.KeycloakUserId) - .Where(x => x.CheckIn.Date == rawData.LeaveStartDate.Date) - .FirstOrDefaultAsync(); - - - if (processCheckIn is not null) - { - switch (rawData.LeaveRange.Trim().ToUpper()) - { - case "MORNING": - processCheckIn.CheckInStatus = "NORMAL"; - break; - case "AFTERNOON": - processCheckIn.CheckOutStatus = "NORMAL"; - break; - case "ALL": - processCheckIn.CheckInStatus = "NORMAL"; - processCheckIn.CheckOutStatus = "NORMAL"; - break; - default: - break; - } - } - await _dbContext.SaveChangesAsync(); - } - else - { - var from = rawData.LeaveStartDate.Date; - var to = rawData.LeaveEndDate.Date; - for (var day = from.Date; day <= to.Date; day = day.AddDays(1)) - { - var processCheckIn = await _dbContext.Set() - .Where(x => x.KeycloakUserId == rawData.KeycloakUserId) - .Where(x => x.CheckIn.Date == day.Date) - .FirstOrDefaultAsync(); - - if (processCheckIn is not null) - { - switch (rawData.LeaveRange.Trim().ToUpper()) - { - case "MORNING": - processCheckIn.CheckInStatus = "NORMAL"; - break; - case "AFTERNOON": - processCheckIn.CheckOutStatus = "NORMAL"; - break; - case "ALL": - processCheckIn.CheckInStatus = "NORMAL"; - processCheckIn.CheckOutStatus = "NORMAL"; - break; - default: - break; - } - } - } - await _dbContext.SaveChangesAsync(); - } - - // Send Noti - var noti = new Notification - { - Body = $"การขอลาของคุณได้รับการอนุมัติ", - ReceiverUserId = profile.Id, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti); - await _appDbContext.SaveChangesAsync(); + throw new Exception("ไม่สามารถทำรายการได้"); } + await _appDbContext.SaveChangesAsync(); + // insert to process timestamp + + + // Send Noti + var noti = new Notification + { + Body = $"การขอลาของคุณได้รับการอนุมัติ", + ReceiverUserId = profile.Id, + Type = "", + Payload = "", + }; + _appDbContext.Set().Add(noti); + await _appDbContext.SaveChangesAsync(); } public async Task RejectLeaveRequest(Guid id, string reason) { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var rawData = await GetByIdWithTrackingAsync(id); + var rawData = await GetByIdAsync(id); if (rawData == null) { throw new Exception(GlobalMessages.DataNotFound); } - // ถ้าไม่มี commander ข้ามไปเช็ค approver ได้เลย - var commanders = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "COMMANDER") - .OrderBy(x => x.Seq) - .ToList(); - if (commanders.Count > 0 && commanders != null) + if (rawData.ApproveStep != "st3") { - if (rawData.ApproveStep != "st3") - { - throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - } + throw new Exception("คำขอนี้ยังไม่ได้รับการอนุมัติจากผู้บังคับบัญชา ไม่สามารถทำรายการได้"); } - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken); + if (profile == null) { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาในขั้นตอนนี้"); + throw new Exception(GlobalMessages.DataNotFound); } - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); + rawData.LeaveStatus = "REJECT"; + rawData.LeaveDirectorComment = reason; + rawData.ApproveStep = "st5"; - if (prevApprover != null) + await UpdateAsync(rawData); + + // Send Noti + var noti = new Notification { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "REJECT"; - approver.Comment = reason; - approver.LastUpdateFullName = FullName ?? ""; - approver.LastUpdateUserId = userId.ToString("D"); - approver.LastUpdatedAt = DateTime.Now; - if (approver.Seq != maxSeq) - { - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti1 = new Notification - { - Body = $"การขอลาของคุณ {rawData.FirstName} {rawData.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti1); - await _appDbContext.SaveChangesAsync(); - - await UpdateWithTrackingAsync(rawData); - } - else - { - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(rawData.KeycloakUserId, AccessToken); - if (profile == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - rawData.LeaveStatus = "REJECT"; - rawData.LeaveDirectorComment = reason; - rawData.ApproveStep = "st5"; - - await UpdateWithTrackingAsync(rawData); - - // Send Noti - var noti = new Notification - { - Body = $"การขอลาของคุณไม่ได้รับการอนุมัติ \r\nเนื่องจาก{reason}", - ReceiverUserId = profile.Id, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti); - await _appDbContext.SaveChangesAsync(); - } + Body = $"การขอลาของคุณไม่ได้รับการอนุมัติ \r\nเนื่องจาก{reason}", + ReceiverUserId = profile.Id, + Type = "", + Payload = "", + }; + _appDbContext.Set().Add(noti); + await _appDbContext.SaveChangesAsync(); } public async Task> GetSumSendLeaveAsync(int year) @@ -1511,8 +672,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Include(x => x.Type) //.Where(x => x.LeaveStartDate.Year == year) .Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate) - //.Where(x => x.LeaveStatus == "NEW") // fix issue : #729 - .Where(x => x.LeaveStatus != "DRAFT") // fix issue : #1524 + .Where(x => x.LeaveStatus == "NEW") // fix issue : #729 .ToListAsync(); var res = (from d in data @@ -1531,31 +691,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests public async Task> GetSumApproveLeaveAsync(int year) { - // Get จาก LeaveBeginning - var beginning = await _dbContext.Set().AsNoTracking() - .Include(x => x.LeaveType) - .Where(x => x.LeaveYear == year) - - .ToListAsync(); - - var beginningData = new List(); - - foreach (var b in beginning) - { - var pf = await _userProfileRepository.GetProfileByProfileIdAsync(b.ProfileId, AccessToken); - if (pf != null) - { - beginningData.Add(new GetSumApproveLeaveByTypeDto - { - KeycloakUserId = pf.Keycloak == null ? Guid.Empty : pf.Keycloak.Value, - LeaveTypeId = b.LeaveTypeId, - LeaveTypeCode = b.LeaveType!.Code, - SumLeaveDay = b.LeaveDaysUsed ?? 0.0 - }); - } - } - - // fix issue : #729 var startFiscalDate = new DateTime(year - 1, 10, 1); var endFiscalDate = new DateTime(year, 9, 30); @@ -1567,8 +702,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Where(x => x.LeaveStatus == "APPROVE") .ToListAsync(); - - var res = (from d in data group d by new { d.KeycloakUserId, LeaveTypeId = d.Type.Id, LeaveTypeCode = d.Type.Code } into grp select new GetSumApproveLeaveByTypeDto @@ -1580,19 +713,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests }) .ToList(); - - var resUnion = (from d in res.Union(beginningData) - group d by new { d.KeycloakUserId, d.LeaveTypeId, d.LeaveTypeCode } into grp - select new GetSumApproveLeaveByTypeDto - { - KeycloakUserId = grp.Key.KeycloakUserId, - LeaveTypeId = grp.Key.LeaveTypeId, - LeaveTypeCode = grp.Key.LeaveTypeCode, - SumLeaveDay = grp.Sum(x => x.SumLeaveDay) - }) - .ToList(); - - return resUnion; + return res; } public async Task> GetSumRejectLeaveAsync(int year) @@ -1632,7 +753,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Include(x => x.Type) //.Where(x => x.LeaveStartDate.Year == year) .Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate) // fix issue : #729 - .Where(x => x.LeaveStatus == "DELETE" && x.LeaveCancelStatus == "APPROVE") + .Where(x => x.LeaveStatus == "DELETE") .ToListAsync(); var res = (from d in data @@ -1668,7 +789,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveTypeId) .Where(x => x.LeaveStartDate.Year == year) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") + .Where(x => x.LeaveStatus == "APPROVE") .ToListAsync(); if (data.Count > 0) @@ -1677,29 +798,13 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests return 0.0; } - public async Task GetSumApproveLeaveByTypeAndRangeForUser(Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.KeycloakUserId == keycloakUserId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - if (data.Count > 0) - return data.Sum(x => x.LeaveTotal); - else - return 0; - } - public async Task GetSumApproveLeaveByRangeForUser(Guid keycloakUserId, DateTime startDate, DateTime endDate) { var data = await _dbContext.Set().AsQueryable().AsNoTracking() .Include(x => x.Type) .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") + .Where(x => x.LeaveStatus == "APPROVE") .ToListAsync(); if (data.Count > 0) @@ -1713,7 +818,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests var data = await _dbContext.Set().AsQueryable() .Include(x => x.Type) .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING").ToListAsync(); + .Where(x => x.LeaveStatus == "APPROVE").ToListAsync(); var res = (from d in data group d by new { d.KeycloakUserId, LeaveTypeId = d.Type.Id, LeaveTypeCode = d.Type.Code } into grp @@ -1722,178 +827,83 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests KeycloakUserId = grp.Key.KeycloakUserId, LeaveTypeId = grp.Key.LeaveTypeId, LeaveTypeCode = grp.Key.LeaveTypeCode, - SumLeaveDay = grp.Sum(x => x.LeaveTotal), - CountLeaveDay = grp.Count() + SumLeaveDay = grp.Sum(x => x.LeaveTotal) }) .ToList(); return res; } - public async Task> GetSumApproveLeaveByRootAndRange(DateTime startDate, DateTime endDate, string type, string role, string? nodeId, int? node, string? nodeIdByReq, int? nodeByReq) + public async Task> GetSumApproveLeaveByRootAndRange(DateTime startDate, DateTime endDate, string type, string role, string? nodeId, int? node) { + // var _nodeId = Guid.Parse(nodeId); var data = new List(); - data = await _dbContext.Set().AsQueryable() - .Include(x => x.Type) - .Where(x => x.ProfileType == type.Trim().ToUpper()) - .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING").ToListAsync(); - // กรองตามสิทธิ์ admin ก่อน - if (role == "CHILD") + if (role == "OWNER" || role == "CHILD") { - data = data.Where(x => - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId) : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId) : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId) : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId) : - node == 0 ? x.RootDnaId == Guid.Parse(nodeId) : - node == null ? true : true - ).ToList(); - } - else if (role == "BROTHER") - { - data = data.Where(x => - node == 4 ? x.Child3DnaId == Guid.Parse(nodeId) : - node == 3 ? x.Child2DnaId == Guid.Parse(nodeId) : - node == 2 ? x.Child1DnaId == Guid.Parse(nodeId) : - node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId) : - node == null ? true : true - ).ToList(); - } - else if (role == "ROOT") - { - data = data.Where(x => x.RootDnaId == Guid.Parse(nodeId)).ToList(); - } - // else if (role == "PARENT") - // { - // data = data.Where(x => x.RootDnaId == Guid.Parse(nodeId) && x.Child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - data = data.Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : - true - ).ToList(); - } - // กรองตามที่ fe ส่งมา - if (role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "BROTHER" || role == "PARENT") - { - data = data - .Where(x => nodeByReq == 4 ? x.Child4DnaId == Guid.Parse(nodeIdByReq) : nodeByReq == 3 ? x.Child3DnaId == Guid.Parse(nodeIdByReq) : nodeByReq == 2 ? x.Child2DnaId == Guid.Parse(nodeIdByReq) : nodeByReq == 1 ? x.Child1DnaId == Guid.Parse(nodeIdByReq) : nodeByReq == 0 ? x.RootDnaId == Guid.Parse(nodeIdByReq) : true) - .ToList(); - } - // รายงานการลางานจำแนกตามเพศฯ Template ให้หน่วยงานแสดงก่อนส่วนราชการ - var org = _userProfileRepository.GetOc(Guid.Parse(nodeIdByReq), nodeByReq ?? 0, AccessToken); - var organizationName = $"{org.Root ?? ""}{(!string.IsNullOrEmpty(org.Child1) ? "/" + org.Child1 : "")}{(!string.IsNullOrEmpty(org.Child2) ? "/" + org.Child2 : "")}{(!string.IsNullOrEmpty(org.Child3) ? "/" + org.Child3 : "")}{(!string.IsNullOrEmpty(org.Child4) ? "/" + org.Child4 : "")}"; - if (data.Count > 0) - { - var grouped = data.GroupBy(d => nodeByReq switch - { - 0 => d.Root, - 1 => d.Child1, - 2 => d.Child2, - 3 => d.Child3, - 4 => d.Child4, - _ => d.Root - }); - var res = (/*from d in data - group d by new { d.Root, d.Child1, d.Child2, d.Child3, d.Child4 } into grp - orderby grp.Key.Root, grp.Key.Child1, grp.Key.Child2, grp.Key.Child3, grp.Key.Child4*/ - from grp in grouped - orderby grp.Key - select new GetSumApproveLeaveByRootDto - { - //Root = $"{grp.Key.Root}{(!string.IsNullOrEmpty(grp.Key.Child1) ? "/" + grp.Key.Child1 : "")}{(!string.IsNullOrEmpty(grp.Key.Child2) ? "/" + grp.Key.Child2 : "")}{(!string.IsNullOrEmpty(grp.Key.Child3) ? "/" + grp.Key.Child3 : "")}{(!string.IsNullOrEmpty(grp.Key.Child4) ? "/" + grp.Key.Child4 : "")}", - Root = organizationName, - SumLeaveDay = grp.Sum(x => x.LeaveTotal), - sickDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-001").Sum(x => x.LeaveTotal), - personalDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-002").Sum(x => x.LeaveTotal), - maternityDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-003").Sum(x => x.LeaveTotal), - wifeDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-004").Sum(x => x.LeaveTotal), - restDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-005").Sum(x => x.LeaveTotal), - ordainDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-006").Sum(x => x.LeaveTotal), - absentDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-007").Sum(x => x.LeaveTotal), - studyDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-008").Sum(x => x.LeaveTotal), - agencyDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-009").Sum(x => x.LeaveTotal), - coupleDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-010").Sum(x => x.LeaveTotal), - therapyDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-011").Sum(x => x.LeaveTotal), - - sickDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-001").Sum(x => x.LeaveTotal), - personalDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-002").Sum(x => x.LeaveTotal), - maternityDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-003").Sum(x => x.LeaveTotal), - wifeDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-004").Sum(x => x.LeaveTotal), - restDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-005").Sum(x => x.LeaveTotal), - ordainDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-006").Sum(x => x.LeaveTotal), - absentDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-007").Sum(x => x.LeaveTotal), - studyDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-008").Sum(x => x.LeaveTotal), - agencyDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-009").Sum(x => x.LeaveTotal), - coupleDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-010").Sum(x => x.LeaveTotal), - therapyDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-011").Sum(x => x.LeaveTotal), - - sickDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-001").Sum(x => x.LeaveTotal), - personalDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-002").Sum(x => x.LeaveTotal), - maternityDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-003").Sum(x => x.LeaveTotal), - wifeDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-004").Sum(x => x.LeaveTotal), - restDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-005").Sum(x => x.LeaveTotal), - ordainDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-006").Sum(x => x.LeaveTotal), - absentDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-007").Sum(x => x.LeaveTotal), - studyDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-008").Sum(x => x.LeaveTotal), - agencyDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-009").Sum(x => x.LeaveTotal), - coupleDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-010").Sum(x => x.LeaveTotal), - therapyDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-011").Sum(x => x.LeaveTotal), - }) - .ToList(); - - return res; + data = await _dbContext.Set().AsQueryable() + .Include(x => x.Type) + .Where(x => x.ProfileType == type.Trim().ToUpper()) + .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) + .Where(x => node == 4 ? x.Child4Id == Guid.Parse(nodeId) : (node == 3 ? x.Child3Id == Guid.Parse(nodeId) : (node == 2 ? x.Child2Id == Guid.Parse(nodeId) : (node == 1 ? x.Child1Id == Guid.Parse(nodeId) : (node == 0 ? x.RootId == Guid.Parse(nodeId) : (node == null ? true : true)))))) + .Where(x => x.LeaveStatus == "APPROVE").ToListAsync(); } else { - return new List - { - new GetSumApproveLeaveByRootDto - { - Root = organizationName, - SumLeaveDay = 0, - sickDayCountMale = 0, - maternityDayCountMale = 0, - wifeDayCountMale = 0, - personalDayCountMale = 0, - restDayCountMale = 0, - ordainDayCountMale = 0, - absentDayCountMale = 0, - studyDayCountMale = 0, - agencyDayCountMale = 0, - coupleDayCountMale = 0, - therapyDayCountMale = 0, - sickDayCountFemale = 0, - maternityDayCountFemale = 0, - wifeDayCountFemale = 0, - personalDayCountFemale = 0, - restDayCountFemale = 0, - ordainDayCountFemale = 0, - absentDayCountFemale = 0, - studyDayCountFemale = 0, - agencyDayCountFemale = 0, - coupleDayCountFemale = 0, - therapyDayCountFemale = 0, - sickDayCountNo = 0, - maternityDayCountNo = 0, - wifeDayCountNo = 0, - personalDayCountNo = 0, - restDayCountNo = 0, - ordainDayCountNo = 0, - absentDayCountNo = 0, - studyDayCountNo = 0, - agencyDayCountNo = 0, - coupleDayCountNo = 0, - therapyDayCountNo = 0 - } - }; + data = await _dbContext.Set().AsQueryable() + .Include(x => x.Type) + .Where(x => x.ProfileType == type.Trim().ToUpper()) + .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) + .Where(x => node == 4 ? x.Child4Id == Guid.Parse(nodeId) : (node == 3 ? x.Child3Id == Guid.Parse(nodeId) : (node == 2 ? x.Child2Id == Guid.Parse(nodeId) : (node == 1 ? x.Child1Id == Guid.Parse(nodeId) : (node == 0 ? x.RootId == Guid.Parse(nodeId) : (node == null ? true : true)))))) + .Where(x => node == 0 ? x.Child1Id == null : (node == 1 ? x.Child2Id == null : (node == 2 ? x.Child3Id == null : (node == 3 ? x.Child4Id == null : true)))) + .Where(x => x.LeaveStatus == "APPROVE").ToListAsync(); } + + var res = (from d in data + group d by new { d.Root, d.Child1, d.Child2, d.Child3, d.Child4 } into grp + orderby grp.Key.Root, grp.Key.Child1, grp.Key.Child2, grp.Key.Child3, grp.Key.Child4 + select new GetSumApproveLeaveByRootDto + { + Root = $"{grp.Key.Root}{(!string.IsNullOrEmpty(grp.Key.Child1) ? "/" + grp.Key.Child1 : "")}{(!string.IsNullOrEmpty(grp.Key.Child2) ? "/" + grp.Key.Child2 : "")}{(!string.IsNullOrEmpty(grp.Key.Child3) ? "/" + grp.Key.Child3 : "")}{(!string.IsNullOrEmpty(grp.Key.Child4) ? "/" + grp.Key.Child4 : "")}", + SumLeaveDay = grp.Sum(x => x.LeaveTotal), + sickDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-001").Sum(x => x.LeaveTotal), + maternityDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-002").Sum(x => x.LeaveTotal), + wifeDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-003").Sum(x => x.LeaveTotal), + personalDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-004").Sum(x => x.LeaveTotal), + restDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-005").Sum(x => x.LeaveTotal), + ordainDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-006").Sum(x => x.LeaveTotal), + absentDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-007").Sum(x => x.LeaveTotal), + studyDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-008").Sum(x => x.LeaveTotal), + agencyDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-009").Sum(x => x.LeaveTotal), + coupleDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-010").Sum(x => x.LeaveTotal), + therapyDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-011").Sum(x => x.LeaveTotal), + + sickDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-001").Sum(x => x.LeaveTotal), + maternityDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-002").Sum(x => x.LeaveTotal), + wifeDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-003").Sum(x => x.LeaveTotal), + personalDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-004").Sum(x => x.LeaveTotal), + restDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-005").Sum(x => x.LeaveTotal), + ordainDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-006").Sum(x => x.LeaveTotal), + absentDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-007").Sum(x => x.LeaveTotal), + studyDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-008").Sum(x => x.LeaveTotal), + agencyDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-009").Sum(x => x.LeaveTotal), + coupleDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-010").Sum(x => x.LeaveTotal), + therapyDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-011").Sum(x => x.LeaveTotal), + + sickDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-001").Sum(x => x.LeaveTotal), + maternityDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-002").Sum(x => x.LeaveTotal), + wifeDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-003").Sum(x => x.LeaveTotal), + personalDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-004").Sum(x => x.LeaveTotal), + restDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-005").Sum(x => x.LeaveTotal), + ordainDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-006").Sum(x => x.LeaveTotal), + absentDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-007").Sum(x => x.LeaveTotal), + studyDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-008").Sum(x => x.LeaveTotal), + agencyDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-009").Sum(x => x.LeaveTotal), + coupleDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-010").Sum(x => x.LeaveTotal), + therapyDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-011").Sum(x => x.LeaveTotal), + }) + .ToList(); + + return res; } public async Task> GetCountApproveLeaveByTypeAndRange(DateTime startDate, DateTime endDate) @@ -1901,8 +911,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests var data = await _dbContext.Set().AsQueryable() .Include(x => x.Type) .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); + .Where(x => x.LeaveStatus == "APPROVE").ToListAsync(); var res = (from d in data group d by new { d.KeycloakUserId, LeaveTypeId = d.Type.Id, LeaveTypeCode = d.Type.Code } into grp @@ -1918,148 +927,14 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests return res; } - public async Task GetSumApproveLeaveTotalByTypeAndRangeForUser(Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate) + public async Task GetSumApproveLeaveByTypeAndRangeForUser(Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate) { var data = await _dbContext.Set().AsQueryable().AsNoTracking() .Include(x => x.Type) .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveTypeId) - //.Where(x => x.CreatedAt >= startDate && x.CreatedAt <= endDate) .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - if (data.Count > 0) - return data.Sum(x => x.LeaveTotal); - else - return 0; - } - - public async Task GetSumApproveLeaveTotalByTypeAndRangeForUser2(Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate, DateTime sendLeaveDate) - { - // startDate/endDate คือขอบเขตปีงบประมาณ (fiscalStart/fiscalEnd) ที่ caller ส่งมา - // ใช้ LeaveStartDate เป็นหลักในการ filter เพื่อให้กรณียื่นลาล่วงหน้าข้ามปีงบประมาณ - // ถูกนับในปีงบประมาณของวันลาจริง (ไม่ใช้วันที่ยื่นลา) - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.KeycloakUserId == keycloakUserId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => (x.DateSendLeave ?? x.CreatedAt) < sendLeaveDate) - .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - if (data.Count > 0) - return data.Sum(x => x.LeaveTotal); - else - return 0; - } - - public async Task GetSumApproveLeaveTotalByTypeAndRangeForUserBefore(Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate,DateTime sendLeaveDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.KeycloakUserId == keycloakUserId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => (x.DateSendLeave ?? x.CreatedAt) < sendLeaveDate) - .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - if (data.Count > 0) - return data.Sum(x => x.LeaveTotal); - else - return 0; - } - - public async Task GetSumApproveLeaveTotalByTypeAndRangeForUserByProfile(Guid profileId, Guid leaveTypeId, DateTime startDate, DateTime endDate,DateTime sendLeaveDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.ProfileId == profileId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => (x.DateSendLeave ?? x.CreatedAt) < sendLeaveDate) - .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - if (data.Count > 0) - return data.Sum(x => x.LeaveTotal); - else - return 0; - } - - public async Task GetSumApproveLeaveCountByTypeAndRangeForUserByProfile(Guid profileId, Guid leaveTypeId, DateTime startDate, DateTime endDate, DateTime sendLeaveDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.ProfileId == profileId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => (x.DateSendLeave ?? x.CreatedAt) < sendLeaveDate) - .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - return data.Count; - } - - public async Task GetSumApproveLeaveCountByTypeAndRangeForUser2(Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate, DateTime sendLeaveDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.KeycloakUserId == keycloakUserId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => (x.DateSendLeave ?? x.CreatedAt) < sendLeaveDate) - .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") - .ToListAsync(); - - return data.Count; - } - - /// - /// วันลาที่สร้างแบบร่างยังไม่ได้ยื่น - /// - /// - /// - /// - /// - /// - /// - public async Task GetSumDraftLeaveTotalByTypeAndRangeForUser2(Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate, DateTime sendLeaveDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.KeycloakUserId == keycloakUserId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => (x.DateSendLeave ?? x.CreatedAt) < sendLeaveDate) - .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => x.LeaveStatus == "DRAFT") - .ToListAsync(); - - if (data.Count > 0) - return data.Sum(x => x.LeaveTotal); - else - return 0; - } - - /// - /// วันลาที่ยื่นแล้วรอพิจารณา - /// - /// - /// - /// - /// - /// - public async Task GetSumNewLeaveTotalByTypeAndRangeForUser2(Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate,DateTime sendLeaveDate) - { - var data = await _dbContext.Set().AsQueryable().AsNoTracking() - .Include(x => x.Type) - .Where(x => x.KeycloakUserId == keycloakUserId) - .Where(x => x.Type.Id == leaveTypeId) - .Where(x => (x.DateSendLeave ?? x.CreatedAt) < sendLeaveDate) - .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - .Where(x => (x.LeaveStatus == "NEW" || x.LeaveStatus == "PENDING")) + .Where(x => x.LeaveStatus == "APPROVE") .ToListAsync(); if (data.Count > 0) @@ -2075,8 +950,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests .Where(x => x.KeycloakUserId == keycloakUserId) .Where(x => x.Type.Id == leaveTypeId) .Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date) - //.Where(x => x.CreatedAt >= startDate && x.CreatedAt <= endDate) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") + .Where(x => x.LeaveStatus == "APPROVE") .ToListAsync(); return data.Count; @@ -2161,7 +1035,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests var data = await _dbContext.Set().AsQueryable().AsNoTracking() .Include(x => x.Type) .Where(x => x.KeycloakUserId == keycloakUserId) - .Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING") + .Where(x => x.LeaveStatus == "APPROVE") .Where(x => x.LeaveStartDate.Date <= date.Date && x.LeaveEndDate >= date.Date) .FirstOrDefaultAsync(); return data; diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs index d4bc0ea8..2d6f0fcf 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs @@ -9,8 +9,6 @@ using BMA.EHR.Domain.Shared; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; -using Serilog; -using System.Diagnostics; namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants { @@ -74,8 +72,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants await base.AddAsync(entity); var userId = UserId != null ? Guid.Parse(UserId) : Guid.Empty; - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken ?? ""); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken ?? ""); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken ?? ""); // fix issue : SIT ระบบบันทึกเวลาปฏิบัติงาน>>ลงเวลากรณีพิเศษ (ไม่มีแจ้งเตือนไปยังผู้บังคับบัญชา) #969 // send noti + inbox + mail @@ -145,147 +142,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants } } - public async Task> GetAdditionalCheckRequestsByAdminRole(int year, int month, string role, string nodeId, int? node, string? keyword) - { - try - { - var data = await _dbContext.Set().AsQueryable() - .Where(x => (x.CheckDate.Year == year && x.CheckDate.Month == month)) - .OrderByDescending(x => x.CreatedAt.Date) - .ToListAsync(); - - if (!string.IsNullOrEmpty(keyword)) - { - data = data.Where(x => - ( - (x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) - || x.Description.Contains(keyword) - - ).ToList(); - } - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - data = data - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))) - .ToList(); - } - else if (role == "BROTHER") - { - data = data - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true))))) - .ToList(); - } - else if (role == "ROOT") - { - data = data - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList(); - } - // else if (role == "PARENT") - // { - // data = data - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null && x.Child1DnaId != Guid.Empty).ToList(); - // } - else if (role == "NORMAL") - { - data = data.Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && - (x.Child1DnaId == Guid.Empty || x.Child1DnaId == null) : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && - (x.Child2DnaId == Guid.Empty || x.Child2DnaId == null) : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && - (x.Child3DnaId == Guid.Empty || x.Child3DnaId == null) : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && - (x.Child4DnaId == Guid.Empty || x.Child4DnaId == null) : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : - true - ).ToList(); - } - return data; - } - catch - { - throw; - } - } - - public async Task> GetAdditionalCheckRequestsByAdminRole2(DateTime startDate, DateTime endDate, string role, string nodeId, int? node, string? keyword, string? status) - { - try - { - var data = await _dbContext.Set().AsQueryable() - .Where(x => (x.CheckDate.Date >= startDate.Date && x.CheckDate.Date <= endDate.Date)) - .OrderByDescending(x => x.CreatedAt.Date) - .ToListAsync(); - - if(!string.IsNullOrEmpty(status)) - data = data.Where(x => x.Status == status).ToList(); - - - if (!string.IsNullOrEmpty(keyword)) - { - data = data.Where(x => - ( - (x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) - || x.Description.Contains(keyword) - - ).ToList(); - } - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - data = data - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))) - .ToList(); - } - else if (role == "BROTHER") - { - data = data - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true))))) - .ToList(); - } - else if (role == "ROOT") - { - data = data - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList(); - } - // else if (role == "PARENT") - // { - // data = data - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null && x.Child1DnaId != Guid.Empty).ToList(); - // } - else if (role == "NORMAL") - { - data = data.Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && - (x.Child1DnaId == Guid.Empty || x.Child1DnaId == null) : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && - (x.Child2DnaId == Guid.Empty || x.Child2DnaId == null) : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && - (x.Child3DnaId == Guid.Empty || x.Child3DnaId == null) : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && - (x.Child4DnaId == Guid.Empty || x.Child4DnaId == null) : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : - true - ).ToList(); - } - return data; - } - catch - { - throw; - } - } - - #endregion } } diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs deleted file mode 100644 index e0967a5c..00000000 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs +++ /dev/null @@ -1,191 +0,0 @@ -using BMA.EHR.Application.Common.Interfaces; -using BMA.EHR.Domain.Models.Leave.TimeAttendants; -using Microsoft.AspNetCore.Http; -using Microsoft.EntityFrameworkCore; - -namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants -{ - public class CheckInJobStatusRepository : GenericLeaveRepository - { - #region " Fields " - - private readonly ILeaveDbContext _dbContext; - - #endregion - - #region " Constructor and Destructor " - - public CheckInJobStatusRepository(ILeaveDbContext dbContext, - IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor) - { - _dbContext = dbContext; - } - - #endregion - - #region " Methods " - - /// - /// ดึงข้อมูล Job Status จาก TaskId - /// - public async Task GetByTaskIdAsync(Guid taskId) - { - var data = await _dbContext.Set() - .Where(x => x.TaskId == taskId) - .FirstOrDefaultAsync(); - - return data; - } - - /// - /// ดึงข้อมูล Job Status จาก UserId และสถานะ - /// - public async Task> GetByUserIdAndStatusAsync(Guid userId, string status) - { - var data = await _dbContext.Set() - .Where(x => x.KeycloakUserId == userId && x.Status == status) - .OrderByDescending(x => x.CreatedDate) - .ToListAsync(); - - return data; - } - - /// - /// ดึงข้อมูล Job Status ที่ยัง pending หรือ processing - /// - public async Task> GetPendingOrProcessingJobsAsync(Guid userId) - { - var data = await _dbContext.Set() - .Where(x => x.KeycloakUserId == userId && - (x.Status == "PENDING" || x.Status == "PROCESSING")) - //.OrderByDescending(x => x.CreatedDate) - .ToListAsync(); - - return data; - } - - /// - /// อัปเดตสถานะเป็น Processing - /// - public async Task UpdateToProcessingAsync(Guid taskId) - { - var job = await GetByTaskIdAsync(taskId); - if (job != null) - { - job.Status = "PROCESSING"; - job.ProcessingDate = DateTime.Now; - await UpdateAsync(job); - } - return job!; - } - - /// - /// อัปเดตสถานะเป็น Completed - /// - public async Task UpdateToCompletedAsync(Guid taskId, string? additionalData = null) - { - var job = await GetByTaskIdAsync(taskId); - if (job != null) - { - job.Status = "COMPLETED"; - job.CompletedDate = DateTime.Now; - if (!string.IsNullOrEmpty(additionalData)) - { - job.AdditionalData = additionalData; - } - await UpdateAsync(job); - } - return job!; - } - - /// - /// อัปเดตสถานะเป็น Failed - /// - public async Task UpdateToFailedAsync(Guid taskId, string errorMessage) - { - var job = await GetByTaskIdAsync(taskId); - if (job != null) - { - job.Status = "FAILED"; - job.CompletedDate = DateTime.Now; - job.ErrorMessage = errorMessage; - await UpdateAsync(job); - } - return job!; - } - - /// - /// ดึงข้อมูลงานที่ค้างอยู่ในสถานะ PENDING หรือ PROCESSING เกินเวลาที่กำหนด (นาที) - /// - public async Task> GetStalePendingOrProcessingJobsAsync(int timeoutMinutes = 30) - { - //var cutoffDate = DateTime.Now.AddMinutes(-timeoutMinutes); - var cutoffDate = DateTime.Now.AddMinutes(-timeoutMinutes); - var staleJobs = await _dbContext.Set() - .Where(x => (x.Status == "PENDING" || x.Status == "PROCESSING") - && x.CreatedDate <= cutoffDate) - .OrderBy(x => x.CreatedDate) - .ToListAsync(); - - return staleJobs; - } - - /// - /// ดึงข้อมูลงานที่ค้างอยู่ในสถานะ PENDING หรือ PROCESSING เกินเวลาที่กำหนด (นาที) ของ user คนใดคนหนึ่ง - /// - public async Task> GetStalePendingOrProcessingJobsByUserAsync(Guid userId, int timeoutMinutes = 30) - { - var cutoffDate = DateTime.Now.AddMinutes(-timeoutMinutes); - //var cutoffDate = new DateTime(2026, 5, 28, 23, 59, 59); - var staleJobs = await _dbContext.Set() - .Where(x => x.KeycloakUserId == userId - && (x.Status == "PENDING" || x.Status == "PROCESSING") - && x.CreatedDate < cutoffDate) - .OrderBy(x => x.CreatedDate) - .ToListAsync(); - - return staleJobs; - } - - /// - /// Mark งานที่ค้างเกินเวลาที่กำหนดเป็น FAILED - /// - public async Task MarkStaleJobsAsFailedAsync(int timeoutMinutes = 30) - { - var staleJobs = await GetStalePendingOrProcessingJobsAsync(timeoutMinutes); - - foreach (var job in staleJobs) - { - job.Status = "FAILED"; - job.CompletedDate = DateTime.Now; - job.ErrorMessage = $"งานค้างในสถานะ {job.Status} เกิน {timeoutMinutes} นาที ระบบทำเครื่องหมายเป็น FAILED อัตโนมัติ"; - } - - if (staleJobs.Any()) - { - _dbContext.Set().UpdateRange(staleJobs); - await _dbContext.SaveChangesAsync(); - } - - return staleJobs.Count; - } - - /// - /// ล้างข้อมูล Job Status ที่เก่าเกิน X วัน - /// - public async Task CleanupOldJobsAsync(int daysOld = 30) - { - var cutoffDate = DateTime.Now.AddDays(-daysOld); - var oldJobs = await _dbContext.Set() - .Where(x => x.CreatedDate < cutoffDate) - .ToListAsync(); - - _dbContext.Set().RemoveRange(oldJobs); - await _dbContext.SaveChangesAsync(); - - return oldJobs.Count; - } - - #endregion - } -} diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/DutyTimeRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/DutyTimeRepository.cs index e96c35a9..2db889ac 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/DutyTimeRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/DutyTimeRepository.cs @@ -61,12 +61,9 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants return await _dbContext.Set().Where(x => x.IsActive).ToListAsync(); } - public async Task GetDefaultAsync(CancellationToken cancellationToken = default) + public async Task GetDefaultAsync() { - // กำหนด timeout เป็น 30 นาที - using var timeoutCts = new CancellationTokenSource(TimeSpan.FromMinutes(30)); - using var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token); - return await _dbContext.Set().Where(x => x.IsDefault).FirstOrDefaultAsync(combinedCts.Token); + return await _dbContext.Set().Where(x => x.IsDefault).FirstOrDefaultAsync(); } #endregion diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/LeaveProcessJobStatusRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/LeaveProcessJobStatusRepository.cs deleted file mode 100644 index 5e9944ad..00000000 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/LeaveProcessJobStatusRepository.cs +++ /dev/null @@ -1,795 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Text.Json; -using System.IO; -using BMA.EHR.Application.Common.Interfaces; -using BMA.EHR.Application.Repositories.Leaves.LeaveRequests; -using BMA.EHR.Application.Repositories.MetaData; -using BMA.EHR.Application.Responses.Profiles; -using BMA.EHR.Domain.Extensions; -using BMA.EHR.Domain.Models.Leave.TimeAttendants; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; - -namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants -{ - public class LeaveProcessJobStatusRepository: GenericLeaveRepository - { - #region " Fields " - - private readonly ILeaveDbContext _dbContext; - private readonly IHttpContextAccessor _httpContextAccessor; - private readonly UserProfileRepository _userProfileRepository; - private readonly HolidayRepository _holidayRepository; - private readonly DutyTimeRepository _dutyTimeRepository; - private readonly UserDutyTimeRepository _userDutyTimeRepository; - private readonly ProcessUserTimeStampRepository _processUserTimeStampRepository; - private readonly LeaveRequestRepository _leaveRequestRepository; - private readonly IConfiguration _configuration; - private readonly IWebHostEnvironment _env; - - #endregion - - #region " Constructor and Destructor " - - public LeaveProcessJobStatusRepository(ILeaveDbContext dbContext, - IHttpContextAccessor httpContextAccessor, - UserProfileRepository userProfileRepository, - HolidayRepository holidayRepository, - DutyTimeRepository dutyTimeRepository, - UserDutyTimeRepository userDutyTimeRepository, - ProcessUserTimeStampRepository processUserTimeStampRepository, - LeaveRequestRepository leaveRequestRepository, - IConfiguration configuration, - IWebHostEnvironment env) : base(dbContext, httpContextAccessor) - { - _dbContext = dbContext; - _httpContextAccessor = httpContextAccessor; - _userProfileRepository = userProfileRepository; - _holidayRepository = holidayRepository; - _configuration = configuration; - _leaveRequestRepository = leaveRequestRepository; - _dutyTimeRepository = dutyTimeRepository; - _userDutyTimeRepository = userDutyTimeRepository; - _processUserTimeStampRepository = processUserTimeStampRepository; - _env = env; - } - - #endregion - - #region " Methods " - - /// - /// ดึงข้อมูล Job Status จาก TaskId - /// - public async Task GetByTaskIdAsync(Guid id) - { - var data = await _dbContext.Set() - .Where(x => x.Id == id) - .FirstOrDefaultAsync(); - - return data; - } - - /// - /// ดึงข้อมูล Job Status จาก UserId และสถานะ - /// - public async Task> GetByUserIdAndStatusAsync(Guid userId, string status) - { - var data = await _dbContext.Set() - .Where(x => x.CreatedUserId == userId.ToString("D") && x.Status == status) - .OrderByDescending(x => x.CreatedDate) - .ToListAsync(); - - return data; - } - - /// - /// ดึงข้อมูล Job Status จาก UserId - /// - public async Task> GetByUserIdAsync(Guid userId) - { - var data = await _dbContext.Set() - .Where(x => x.CreatedUserId == userId.ToString("D")) - .OrderByDescending(x => x.CreatedDate) - .ToListAsync(); - - return data; - } - - /// - /// ดึงข้อมูล Job Status ที่ยัง pending หรือ processing - /// - public async Task> GetPendingOrProcessingJobsAsync(Guid userId) - { - var data = await _dbContext.Set() - .Where(x => x.CreatedUserId == userId.ToString("D") && - (x.Status == "PENDING" || x.Status == "PROCESSING")) - //.OrderByDescending(x => x.CreatedDate) - .ToListAsync(); - - return data; - } - - public async Task> GetPendingJobsAsync() - { - var data = await _dbContext.Set() - .Where(x => x.Status == "PENDING") - .ToListAsync(); - - return data; - } - - /// - /// อัปเดตสถานะเป็น Processing - /// - public async Task UpdateToProcessingAsync(Guid id) - { - var job = await GetByTaskIdAsync(id); - if (job != null) - { - job.Status = "PROCESSING"; - job.ProcessingDate = DateTime.Now; - await UpdateAsync(job); - } - return job!; - } - - /// - /// อัปเดตสถานะเป็น Completed - /// - public async Task UpdateToCompletedAsync(Guid id, string? additionalData = null) - { - var job = await GetByTaskIdAsync(id); - if (job != null) - { - job.Status = "COMPLETED"; - job.CompletedDate = DateTime.Now; - await UpdateAsync(job); - } - return job!; - } - - /// - /// อัปเดตสถานะเป็น Failed - /// - public async Task UpdateToFailedAsync(Guid id, string errorMessage) - { - var job = await GetByTaskIdAsync(id); - if (job != null) - { - job.Status = "FAILED"; - job.CompletedDate = DateTime.Now; - job.ErrorMessage = errorMessage; - await UpdateAsync(job); - } - return job!; - } - - public async Task ProcessTaskAsync(Guid rootDnaId, DateTime? startDate, DateTime? endDate) - { - - var profiles = new List(); - var dateStart = startDate?.Date ?? DateTime.Now.Date; - var dateEnd = endDate?.Date ?? DateTime.Now.Date; - - var holidays = await _holidayRepository.GetHolidayAsync(dateStart, dateEnd); - var weekend = _holidayRepository.GetWeekEnd(dateStart, dateEnd); - var excludeDates = holidays.Union(weekend).ToList(); - - var dateList = new List(); - for (DateTime i = dateStart; i <= dateEnd; i = i.AddDays(1)) - { - if (holidays.Contains(i)) - { - var d = await _holidayRepository.GetHolidayAsync(i); - dateList.Add(new LoopDate - { - date = i, - isHoliday = true, - isWeekEnd = false, - dateRemark = d - }); - } - else if (weekend.Contains(i)) - { - dateList.Add(new LoopDate - { - date = i, - isHoliday = true, - isWeekEnd = false, - dateRemark = "วันหยุด" - }); - } - else - { - dateList.Add(new LoopDate - { - date = i, - isHoliday = false, - isWeekEnd = false, - dateRemark = "" - }); - } - } - - var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); - if (defaultRound == null) - { - throw new Exception("ไม่พบรอบการลงเวลา Default"); - } - - var employees = new List(); - - foreach (var dd in dateList.Where(x => !x.isHoliday && !x.isWeekEnd)) - { - profiles = await _userProfileRepository.GetAllOfficerByRootDnaId(rootDnaId.ToString(),dd.date); - foreach (var p in profiles) - { - var count = 1; - var keycloakUserId = p.Keycloak ?? Guid.Empty; - - var timeStamps = await _processUserTimeStampRepository.GetTimestampByDateAsync(keycloakUserId, dd.date); - - var fullName = $"{p.Prefix}{p.FirstName} {p.LastName}"; - - var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id, dd.date); - var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; - var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); - - var duty = userRound ?? defaultRound; - - // check วันลาของแต่ละคน - var leaveReq = await _leaveRequestRepository.GetLeavePeriodAsync(keycloakUserId, dd.date); - var remarkStr = string.Empty; - var status = string.Empty; - var stampType = string.Empty; - var stampAmount = 0.0; - - if (leaveReq != null) - { - switch (leaveReq.Type.Code.ToUpper()) - { - case "LV-001": - case "LV-002": - case "LV-005": - remarkStr += leaveReq.Type.Name; - var leaveRange = leaveReq.LeaveRange == null ? "" : leaveReq.LeaveRange.ToUpper(); - - if(leaveReq.LeaveStartDate.Date == leaveReq.LeaveEndDate.Date) - { - if (leaveRange == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRange == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - - - // var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - // if (leaveRangeEnd == "MORNING") - // remarkStr += "ครึ่งวันเช้า"; - // else if (leaveRangeEnd == "AFTERNOON") - // remarkStr += "ครึ่งวันบ่าย"; - - var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - if (leaveRange != leaveRangeEnd) - { - if (leaveRangeEnd == "MORNING") - remarkStr += " - ครึ่งวันเช้า"; - else if (leaveRangeEnd == "AFTERNOON") - remarkStr += " - ครึ่งวันบ่าย"; - } - } - else - { - if(dd.date == leaveReq.LeaveStartDate.Date) - { - if (leaveRange == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRange == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - } - else if(dd.date == leaveReq.LeaveEndDate.Date) - { - var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - if (leaveRangeEnd == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRangeEnd == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - else - remarkStr += "เต็มวัน"; - } - else - { - remarkStr += "เต็มวัน"; - } - } - - - break; - default: - remarkStr += leaveReq.Type.Name; - break; - } - status = "LEAVE"; - if(leaveReq.LeaveStartDate.Date == dd.date) - { - stampType = leaveReq.LeaveRange ?? ""; - stampAmount = leaveReq.LeaveRange != "ALL" ? 0.5 : 1; - } - else if(leaveReq.LeaveEndDate.Date == dd.date) - { - stampAmount = leaveReq.LeaveRangeEnd != "ALL" ? 0.5 : 1; - stampType = leaveReq.LeaveRangeEnd ?? ""; - } - else - stampAmount = leaveReq.LeaveRange != "ALL" || leaveReq.LeaveRangeEnd != "ALL" ? 0.5 : 1; - if(stampType == "ALL") stampType = "FULL_DAY"; - } - else - { - if (timeStamps == null) - { - if (dd.date <= DateTime.Now.Date) - { - remarkStr = "ขาดราชการ"; - status = "ABSENT"; - stampType = "FULL_DAY"; - stampAmount = 1; - if (dd.isHoliday == true) - { - remarkStr = $"วันหยุด ({dd.dateRemark})"; - status = "HOLIDAY"; - } - else if (dd.isWeekEnd) - { - remarkStr = dd.dateRemark; - status = "WEEKEND"; - } - } - else remarkStr = ""; - } - else - { - // check status ของการลงเวลา - if (timeStamps.CheckOut != null) - { - if (timeStamps.CheckOutStatus == "ABSENT") - { - remarkStr = "ขาดราชการ" + (!timeStamps.IsLocationCheckOut ? $" (นอกสถานที่:{timeStamps.CheckOutLocationName})".Trim() : ""); - status = "ABSENT"; - stampType = "FULL_DAY"; - stampAmount = 1; - } - else if (timeStamps.CheckInStatus == "ABSENT") - { - remarkStr = "ขาดราชการ" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - status = "ABSENT"; - stampType = "FULL_DAY"; - stampAmount = 1; - } - else if (timeStamps.CheckInStatus == "LATE") - { - remarkStr = "สาย" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - status = "LATE"; - stampType = "FULL_DAY"; - stampAmount = 1; - //lateTotal += 1; - } - else - remarkStr = !timeStamps.IsLocationCheckIn ? $" นอกสถานที่:{timeStamps.CheckInLocationName}".Trim() : ""; - } - else - { - if (timeStamps.CheckInStatus == "ABSENT") - { - status = "ABSENT"; - stampType = "FULL_DAY"; - stampAmount = 1; - remarkStr = "ขาดราชการ" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - } - else if (timeStamps.CheckInStatus == "LATE") - { - status = "LATE"; - stampType = "FULL_DAY"; - stampAmount = 1; - remarkStr = "สาย" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - //lateTotal += 1; - } - else - remarkStr = !timeStamps.IsLocationCheckIn ? $" นอกสถานที่:{timeStamps.CheckInLocationName}".Trim() : ""; - } - } - } - - var emp = new DateResultReport - { - profileId = p.Id.ToString(), - stampDate = dd.date, - stampType = stampType, - stampAmount = stampAmount, - remark = remarkStr, - status = status - }; - - employees.Add(emp); - count++; - } - - // Write employees to JSON file - // var fileName = $"employees_{DateTime.Now:yyyyMMdd_HHmmss}.txt"; - // var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Exports", fileName); - - // // Ensure directory exists - // var directory = Path.GetDirectoryName(filePath); - // if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory)) - // { - // Directory.CreateDirectory(directory); - // } - - // var jsonOptions = new JsonSerializerOptions - // { - // WriteIndented = true, - // Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping - // }; - - // var jsonContent = JsonSerializer.Serialize(employees, jsonOptions); - // await File.WriteAllTextAsync(filePath, jsonContent); - } - - //call api - var apiPath = $"{_configuration["API"]}/org/unauthorize/profile/absent-late/batch"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - records = employees.Where(x => x.status == "ABSENT" || x.status == "LATE").ToList() - }; - - var apiResult = await PostExternalAPIAsync(apiPath, AccessToken ?? "", body, apiKey); - if(apiResult == "") - { - throw new Exception($"เรียก API {apiPath} ไม่สำเร็จ"); - } - } - - public async Task ProcessEmpTaskAsync(Guid rootDnaId, DateTime? startDate, DateTime? endDate) - { - - var profiles = new List(); - var dateStart = startDate?.Date ?? DateTime.Now.Date; - var dateEnd = endDate?.Date ?? DateTime.Now.Date; - - var holidays = await _holidayRepository.GetHolidayAsync(dateStart, dateEnd); - var weekend = _holidayRepository.GetWeekEnd(dateStart, dateEnd); - var excludeDates = holidays.Union(weekend).ToList(); - - var dateList = new List(); - for (DateTime i = dateStart; i <= dateEnd; i = i.AddDays(1)) - { - if (holidays.Contains(i)) - { - var d = await _holidayRepository.GetHolidayAsync(i); - dateList.Add(new LoopDate - { - date = i, - isHoliday = true, - isWeekEnd = false, - dateRemark = d - }); - } - else if (weekend.Contains(i)) - { - dateList.Add(new LoopDate - { - date = i, - isHoliday = true, - isWeekEnd = false, - dateRemark = "วันหยุด" - }); - } - else - { - dateList.Add(new LoopDate - { - date = i, - isHoliday = false, - isWeekEnd = false, - dateRemark = "" - }); - } - } - - var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); - if (defaultRound == null) - { - throw new Exception("ไม่พบรอบการลงเวลา Default"); - } - - var employees = new List(); - - foreach (var dd in dateList.Where(x => !x.isHoliday && !x.isWeekEnd)) - { - profiles = await _userProfileRepository.GetAllEmployeeByRootDnaId(rootDnaId.ToString(),dd.date); - foreach (var p in profiles) - { - var count = 1; - var keycloakUserId = p.Keycloak ?? Guid.Empty; - - var timeStamps = await _processUserTimeStampRepository.GetTimestampByDateAsync(keycloakUserId, dd.date); - - var fullName = $"{p.Prefix}{p.FirstName} {p.LastName}"; - - var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id, dd.date); - var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; - var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); - - var duty = userRound ?? defaultRound; - - // check วันลาของแต่ละคน - var leaveReq = await _leaveRequestRepository.GetLeavePeriodAsync(keycloakUserId, dd.date); - var remarkStr = string.Empty; - var status = string.Empty; - var stampType = string.Empty; - var stampAmount = 0.0; - - if (leaveReq != null) - { - switch (leaveReq.Type.Code.ToUpper()) - { - case "LV-001": - case "LV-002": - case "LV-005": - remarkStr += leaveReq.Type.Name; - var leaveRange = leaveReq.LeaveRange == null ? "" : leaveReq.LeaveRange.ToUpper(); - - if(leaveReq.LeaveStartDate.Date == leaveReq.LeaveEndDate.Date) - { - if (leaveRange == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRange == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - - - // var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - // if (leaveRangeEnd == "MORNING") - // remarkStr += "ครึ่งวันเช้า"; - // else if (leaveRangeEnd == "AFTERNOON") - // remarkStr += "ครึ่งวันบ่าย"; - - var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - if (leaveRange != leaveRangeEnd) - { - if (leaveRangeEnd == "MORNING") - remarkStr += " - ครึ่งวันเช้า"; - else if (leaveRangeEnd == "AFTERNOON") - remarkStr += " - ครึ่งวันบ่าย"; - } - } - else - { - if(dd.date == leaveReq.LeaveStartDate.Date) - { - if (leaveRange == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRange == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - } - else if(dd.date == leaveReq.LeaveEndDate.Date) - { - var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - if (leaveRangeEnd == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRangeEnd == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - } - else - { - remarkStr += "เต็มวัน"; - } - } - break; - default: - remarkStr += leaveReq.Type.Name; - break; - } - status = "LEAVE"; - if(leaveReq.LeaveStartDate.Date == dd.date) - { - stampType = leaveReq.LeaveRange ?? ""; - stampAmount = leaveReq.LeaveRange != "ALL" ? 0.5 : 1; - } - else if(leaveReq.LeaveEndDate.Date == dd.date) - { - stampAmount = leaveReq.LeaveRangeEnd != "ALL" ? 0.5 : 1; - stampType = leaveReq.LeaveRangeEnd ?? ""; - } - else - stampAmount = leaveReq.LeaveRange != "ALL" || leaveReq.LeaveRangeEnd != "ALL" ? 0.5 : 1; - if(stampType == "ALL") stampType = "FULL_DAY"; - //stampAmount = leaveReq.LeaveRange != "ALL" || leaveReq.LeaveRangeEnd != "ALL" ? 0.5 : 1; - } - else - { - if (timeStamps == null) - { - if (dd.date <= DateTime.Now.Date) - { - remarkStr = "ขาดราชการ"; - status = "ABSENT"; - stampType = "FULL_DAY"; - stampAmount = 1; - if (dd.isHoliday == true) - { - remarkStr = $"วันหยุด ({dd.dateRemark})"; - status = "HOLIDAY"; - } - else if (dd.isWeekEnd) - { - remarkStr = dd.dateRemark; - status = "WEEKEND"; - } - } - else remarkStr = ""; - } - else - { - // check status ของการลงเวลา - if (timeStamps.CheckOut != null) - { - if (timeStamps.CheckOutStatus == "ABSENT") - { - remarkStr = "ขาดราชการ" + (!timeStamps.IsLocationCheckOut ? $" (นอกสถานที่:{timeStamps.CheckOutLocationName})".Trim() : ""); - status = "ABSENT"; - stampType = "FULL_DAY"; - stampAmount = 1; - } - else if (timeStamps.CheckInStatus == "ABSENT") - { - remarkStr = "ขาดราชการ" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - status = "ABSENT"; - stampType = "FULL_DAY"; - stampAmount = 1; - } - else if (timeStamps.CheckInStatus == "LATE") - { - remarkStr = "สาย" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - status = "LATE"; - stampType = "FULL_DAY"; - stampAmount = 1; - //lateTotal += 1; - } - else - remarkStr = !timeStamps.IsLocationCheckIn ? $" นอกสถานที่:{timeStamps.CheckInLocationName}".Trim() : ""; - } - else - { - if (timeStamps.CheckInStatus == "ABSENT") - { - status = "ABSENT"; - stampType = "FULL_DAY"; - stampAmount = 1; - remarkStr = "ขาดราชการ" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - } - else if (timeStamps.CheckInStatus == "LATE") - { - status = "LATE"; - stampType = "FULL_DAY"; - stampAmount = 1; - remarkStr = "สาย" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - //lateTotal += 1; - } - else - remarkStr = !timeStamps.IsLocationCheckIn ? $" นอกสถานที่:{timeStamps.CheckInLocationName}".Trim() : ""; - } - } - } - - var emp = new DateResultReport - { - profileId = p.Id.ToString(), - stampDate = dd.date, - stampType = stampType, - stampAmount = stampAmount, - remark = remarkStr, - status = status - }; - - employees.Add(emp); - count++; - } - - // Write employees to JSON file - // var fileName = $"employees_{DateTime.Now:yyyyMMdd_HHmmss}.txt"; - // var filePath = Path.Combine(_env.ContentRootPath, "Exports", fileName); - - // // Ensure directory exists - // var directory = Path.GetDirectoryName(filePath); - // if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory)) - // { - // Directory.CreateDirectory(directory); - // } - - // var jsonOptions = new JsonSerializerOptions - // { - // WriteIndented = true, - // Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping - // }; - - // var jsonContent = JsonSerializer.Serialize(employees, jsonOptions); - // Console.WriteLine($"Writing file to: {filePath}"); - // await File.WriteAllTextAsync(filePath, jsonContent); - // Console.WriteLine($"File written successfully: {fileName}"); - } - - // call api - var apiPath = $"{_configuration["API"]}/org/unauthorize/profile-employee/absent-late/batch"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - records = employees.Where(x => x.status == "ABSENT" || x.status == "LATE").ToList() - }; - - var apiResult = await PostExternalAPIAsync(apiPath, AccessToken ?? "", body, apiKey); - if(apiResult == "") - { - throw new Exception($"เรียก API {apiPath} ไม่สำเร็จ"); - } - } - - - public async Task ProcessPendingJobsAsync() - { - var pendingJobs = await GetPendingJobsAsync(); - Console.WriteLine($"พบงานที่ค้างอยู่ในสถานะ PENDING จำนวน {pendingJobs.Count} งาน"); - - foreach (var job in pendingJobs) - { - try - { - // อัปเดตสถานะเป็น Processing - await UpdateToProcessingAsync(job.Id); - - // ทำงานที่ต้องการที่นี่ (เช่น เรียก API, ประมวลผลข้อมูล ฯลฯ) - await ProcessTaskAsync(job.RootDnaId,job.StartDate, job.EndDate); - await ProcessEmpTaskAsync(job.RootDnaId,job.StartDate, job.EndDate); - - // อัปเดตสถานะเป็น Completed - await UpdateToCompletedAsync(job.Id); - } - catch (Exception ex) - { - // หากเกิดข้อผิดพลาด อัปเดตสถานะเป็น Failed พร้อมข้อความแสดงข้อผิดพลาด - await UpdateToFailedAsync(job.Id, ex.Message); - } - } - } - - #endregion - } - - class LoopDate - { - public DateTime date { get; set; } - - public bool isHoliday { get; set; } - - public bool isWeekEnd { get; set; } - - public string dateRemark { get; set; } - - } - - class DateResultReport - { - public string? profileId { get; set; } - public DateTime stampDate { get; set; } - public string stampType { get; set; } - public double stampAmount { get; set; } - public string remark { get; set; } - public string status { get; set; } - } - -} \ No newline at end of file diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/ProcessUserTimeStampRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/ProcessUserTimeStampRepository.cs index 77aba421..ee897d88 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/ProcessUserTimeStampRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/ProcessUserTimeStampRepository.cs @@ -139,64 +139,26 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants return data; } - public async Task> GetTimestampByDateLateAsync(string type, string role, string nodeId, int? node, string nodeIdByReq, int? nodeByReq, DateTime StartDate, DateTime EndDate) + public async Task> GetTimestampByDateLateAsync(string type, string role, string nodeId, int node) { + var _nodeId = Guid.Parse(nodeId); var data = new List(); - data = await _dbContext.Set().AsQueryable() - .Where(x => x.CheckInStatus == "LATE") - .Where(u => u.CheckIn.Date >= StartDate && u.CheckIn.Date <= EndDate) - .Where(x => x.ProfileType == type.Trim().ToUpper()).ToListAsync(); - // กรองตามสิทธิ์ admin ก่อน - if (role == "CHILD") + if (role == "OWNER" || role == "CHILD") { - data = data.Where(x => - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId) : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId) : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId) : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId) : - node == 0 ? x.RootDnaId == Guid.Parse(nodeId) : - node == null ? true : true - ).ToList(); + data = await _dbContext.Set().AsQueryable() + .Where(x => x.CheckInStatus == "LATE") + .Where(x => x.ProfileType == type.Trim().ToUpper()) + .Where(x => node == 4 ? x.Child4Id == _nodeId : (node == 3 ? x.Child3Id == _nodeId : (node == 2 ? x.Child2Id == _nodeId : (node == 1 ? x.Child1Id == _nodeId : (node == 0 ? x.RootId == _nodeId : true))))) + .ToListAsync(); } - else if (role == "BROTHER") + else { - data = data.Where(x => - node == 4 ? x.Child3DnaId == Guid.Parse(nodeId) : - node == 3 ? x.Child2DnaId == Guid.Parse(nodeId) : - node == 2 ? x.Child1DnaId == Guid.Parse(nodeId) : - node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId) : - node == null ? true : true - ).ToList(); - } - else if (role == "ROOT") - { - data = data.Where(x => x.RootDnaId == Guid.Parse(nodeId)).ToList(); - } - // else if (role == "PARENT") - // { - // data = data.Where(x => x.RootDnaId == Guid.Parse(nodeId) && x.Child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - data = data.Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : - true - ).ToList(); - } - // กรองตามที่ fe ส่งมา - if (role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "BROTHER" || role == "PARENT") - { - data = data.Where(x => - nodeByReq == 4 ? x.Child4DnaId == Guid.Parse(nodeIdByReq) : - nodeByReq == 3 ? x.Child3DnaId == Guid.Parse(nodeIdByReq) : - nodeByReq == 2 ? x.Child2DnaId == Guid.Parse(nodeIdByReq) : - nodeByReq == 1 ? x.Child1DnaId == Guid.Parse(nodeIdByReq) : - nodeByReq == 0 ? x.RootDnaId == Guid.Parse(nodeIdByReq) : true - ).ToList(); + data = await _dbContext.Set().AsQueryable() + .Where(x => x.CheckInStatus == "LATE") + .Where(x => x.ProfileType == type.Trim().ToUpper()) + .Where(x => node == 4 ? x.Child4Id == _nodeId : (node == 3 ? x.Child3Id == _nodeId : (node == 2 ? x.Child2Id == _nodeId : (node == 1 ? x.Child1Id == _nodeId : (node == 0 ? x.RootId == _nodeId : true))))) + .Where(x => node == 0 ? x.Child1Id == null : (node == 1 ? x.Child2Id == null : (node == 2 ? x.Child3Id == null : (node == 3 ? x.Child4Id == null : true)))) + .ToListAsync(); } return data; } @@ -213,12 +175,9 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants public async Task> GetTimeStampHistoryAsync(Guid keycloakId, int year, int page = 1, int pageSize = 10, string keyword = "") { - var fiscalDateStart = new DateTime(year - 1, 10, 1); - var fiscalDateEnd = new DateTime(year, 9, 30); - var data = await _dbContext.Set() .Where(u => u.KeycloakUserId == keycloakId) - .Where(u => u.CheckIn.Date >= fiscalDateStart && u.CheckIn.Date <= fiscalDateEnd) + .Where(u => u.CheckIn.Year == year) .OrderByDescending(u => u.CheckIn.Date) .Skip((page - 1) * pageSize) .Take(pageSize) @@ -227,19 +186,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants return data; } - public async Task> GetTimeStampHistoryAsync2(Guid keycloakId, int year) - { - var fiscalDateStart = new DateTime(year - 1, 10, 1); - var fiscalDateEnd = new DateTime(year, 9, 30); - - var data = await _dbContext.Set() - .Where(u => u.KeycloakUserId == keycloakId) - .Where(u => u.CheckIn.Date >= fiscalDateStart && u.CheckIn.Date <= fiscalDateEnd) - .OrderByDescending(u => u.CheckIn.Date) - .ToListAsync(); - return data; - } - public async Task GetTimeStampHistoryForAdminCountAsync(DateTime startDate, DateTime endDate) { var data = await _dbContext.Set() @@ -272,55 +218,6 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants return data; } - public async Task> GetTimeStampHistoryForAdminRoleAsync(DateTime startDate, DateTime endDate, string role, string nodeId, int? node) - { - var data = await _dbContext.Set() - .Where(u => u.CheckIn.Date >= startDate.Date && u.CheckIn.Date <= endDate.Date) - .OrderBy(u => u.CheckIn) - - .ToListAsync(); - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - data = data - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))) - .ToList(); - } - else if (role == "BROTHER") - { - data = data - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true))))) - .ToList(); - } - else if (role == "ROOT") - { - data = data - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)) - .ToList(); - } - // else if (role == "PARENT") - // { - // data = data - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null) - // .ToList(); - // } - else if (role == "NORMAL") - { - data = data.Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : - true - ).ToList(); - } - return data; - } - public async Task GetTimeStampById(Guid id) { var data = await _dbContext.Set() diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserDutyTimeRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserDutyTimeRepository.cs index b34bc4db..3eefefe0 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserDutyTimeRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserDutyTimeRepository.cs @@ -101,17 +101,14 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants return data; } - public async Task GetLastEffectRound(Guid profileId, DateTime? effectiveDate = null, CancellationToken cancellationToken = default) + public async Task GetLastEffectRound(Guid profileId) { - // กำหนด timeout เป็น 30 นาที - using var timeoutCts = new CancellationTokenSource(TimeSpan.FromMinutes(30)); - using var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token); - effectiveDate ??= DateTime.Now; var data = await _dbContext.Set() .Where(x => x.ProfileId == profileId) - .Where(x => x.EffectiveDate.Value.Date <= effectiveDate.Value.Date) + .Where(x => x.IsProcess) + .Where(x => x.EffectiveDate.Value.Date <= DateTime.Now.Date) .OrderByDescending(x => x.EffectiveDate) - .FirstOrDefaultAsync(combinedCts.Token); + .FirstOrDefaultAsync(); return data; } diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserTimeStampRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserTimeStampRepository.cs index 6dffcb6c..2eb6f6b3 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserTimeStampRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/UserTimeStampRepository.cs @@ -74,16 +74,12 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants return data; } - public async Task GetLastRecord(Guid keycloakId, CancellationToken cancellationToken = default) + public async Task GetLastRecord(Guid keycloakId) { - // กำหนด timeout เป็น 30 นาที - using var timeoutCts = new CancellationTokenSource(TimeSpan.FromMinutes(30)); - using var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token); - var data = await _dbContext.Set() .Where(u => u.KeycloakUserId == keycloakId) .OrderByDescending(u => u.CheckIn) - .FirstOrDefaultAsync(combinedCts.Token); + .FirstOrDefaultAsync(); return data; } @@ -94,7 +90,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants .Where(u => u.KeycloakUserId == keycloakId) .Where(u => u.CheckIn.Year == year) .OrderBy(u => u.CheckIn) - + .ToListAsync(); return data; @@ -105,61 +101,12 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants var data = await _dbContext.Set() .Where(u => u.CheckIn.Date >= startDate.Date && u.CheckIn.Date <= endDate.Date) .OrderBy(u => u.CheckIn) - + .ToListAsync(); return data; } - public async Task> GetTimeStampHistoryForAdminRoleAsync(DateTime startDate, DateTime endDate, string role, string nodeId, int? node) - { - var data = await _dbContext.Set() - .Where(u => u.CheckIn.Date >= startDate.Date && u.CheckIn.Date <= endDate.Date) - .OrderBy(u => u.CheckIn) - - .ToListAsync(); - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - data = data - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))) - .ToList(); - } - else if (role == "BROTHER") - { - data = data - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true))))) - .ToList(); - } - else if (role == "ROOT") - { - data = data - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)) - .ToList(); - } - // else if (role == "PARENT") - // { - // data = data - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null) - // .ToList(); - // } - else if (role == "NORMAL") - { - data = data.Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : - true - ).ToList(); - } - return data; - } - public async Task GetTimeStampById(Guid id) { var data = await _dbContext.Set() diff --git a/BMA.EHR.Application/Repositories/MessageQueue/InboxRepository.cs b/BMA.EHR.Application/Repositories/MessageQueue/InboxRepository.cs index 46019cfc..af44f06b 100644 --- a/BMA.EHR.Application/Repositories/MessageQueue/InboxRepository.cs +++ b/BMA.EHR.Application/Repositories/MessageQueue/InboxRepository.cs @@ -51,13 +51,12 @@ namespace BMA.EHR.Application.Repositories.MessageQueue // // throw new Exception(GlobalMessages.DataNotFound); // } - //var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; - var apiUrl = $"{_configuration["API"]}/org/dotnet/get-profileId"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; var profileId = ""; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); diff --git a/BMA.EHR.Application/Repositories/MessageQueue/NotificationRepository.cs b/BMA.EHR.Application/Repositories/MessageQueue/NotificationRepository.cs index 9a8d71e3..41135a1f 100644 --- a/BMA.EHR.Application/Repositories/MessageQueue/NotificationRepository.cs +++ b/BMA.EHR.Application/Repositories/MessageQueue/NotificationRepository.cs @@ -55,13 +55,12 @@ namespace BMA.EHR.Application.Repositories.MessageQueue // // throw new Exception(GlobalMessages.DataNotFound); // } - //var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; - var apiUrl = $"{_configuration["API"]}/org/dotnet/get-profileId"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; var profileId = ""; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -132,13 +131,12 @@ namespace BMA.EHR.Application.Repositories.MessageQueue // { // return 0; // } - //var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; - var apiUrl = $"{_configuration["API"]}/org/dotnet/get-profileId"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; var profileId = ""; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -187,44 +185,6 @@ namespace BMA.EHR.Application.Repositories.MessageQueue } } - private async Task GetMyProfileIdAsync() - { - var apiUrl = $"{_configuration["API"]}/org/dotnet/get-profileId"; - var response = await GetExternalAPIAsync(apiUrl, AccessToken!, _configuration["API_KEY"]!); - - if (string.IsNullOrWhiteSpace(response)) - return string.Empty; - - var org = JsonConvert.DeserializeObject(response); - if (org == null || org.result == null) - return string.Empty; - - return org.result.profileId ?? string.Empty; - } - - public async Task DeleteAllMyNotificationsAsync() - { - try - { - var profileId = await GetMyProfileIdAsync(); - if (string.IsNullOrEmpty(profileId)) - return 0; - - var notifications = await _dbContext.Set() - .Where(x => x.ReceiverUserId == Guid.Parse(profileId)) - .Where(x => x.DeleteDate == null) - .ToListAsync(); - - _dbContext.Set().RemoveRange(notifications); - await _dbContext.SaveChangesAsync(); - return notifications.Count; - } - catch - { - throw; - } - } - public async Task PushNotificationAsync(Guid ReceiverUserId, string Subject, string Body, string Payload = "", string NotiLink = "", bool IsSendInbox = false, bool IsSendMail = false) { try @@ -267,7 +227,7 @@ namespace BMA.EHR.Application.Repositories.MessageQueue using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -327,7 +287,7 @@ namespace BMA.EHR.Application.Repositories.MessageQueue using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -401,7 +361,7 @@ namespace BMA.EHR.Application.Repositories.MessageQueue using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -474,7 +434,7 @@ namespace BMA.EHR.Application.Repositories.MessageQueue using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -544,7 +504,7 @@ namespace BMA.EHR.Application.Repositories.MessageQueue using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -606,7 +566,7 @@ namespace BMA.EHR.Application.Repositories.MessageQueue using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); diff --git a/BMA.EHR.Application/Repositories/MetaData/HolidayRepository.cs b/BMA.EHR.Application/Repositories/MetaData/HolidayRepository.cs index 1c8ae006..751b0473 100644 --- a/BMA.EHR.Application/Repositories/MetaData/HolidayRepository.cs +++ b/BMA.EHR.Application/Repositories/MetaData/HolidayRepository.cs @@ -26,16 +26,6 @@ namespace BMA.EHR.Application.Repositories.MetaData #region " Methods " - public async Task GetHolidayAsync(DateTime date, string category = "NORMAL") - { - var data = await _dbContext.Set().AsQueryable() - .Where(x => x.Category == category) - .Where(x => x.HolidayDate.Date == date.Date) - .Select(x => x.Name) - .FirstOrDefaultAsync(); - return data ?? string.Empty; - } - public async Task> GetHolidayAsync(DateTime startDate, DateTime endDate, string category = "NORMAL") { var data = await _dbContext.Set().AsQueryable() @@ -49,16 +39,12 @@ namespace BMA.EHR.Application.Repositories.MetaData public async Task GetHolidayCountAsync(DateTime startDate, DateTime endDate, string category = "NORMAL") { - var query = _dbContext.Set().AsQueryable() + var data = await _dbContext.Set().AsQueryable() .Where(x => x.Category == category) - .Where(x => x.HolidayDate.Date >= startDate && x.HolidayDate.Date <= endDate); + .Where(x => x.HolidayDate.Date >= startDate && x.HolidayDate.Date <= endDate) + .CountAsync(); - if (category == "NORMAL") - query = query.Where(x => x.HolidayDate.DayOfWeek != DayOfWeek.Saturday && x.HolidayDate.DayOfWeek != DayOfWeek.Sunday); - else - query = query.Where(x => x.HolidayDate.DayOfWeek != DayOfWeek.Sunday); - - return await query.CountAsync(); + return data; } public List GetWeekEnd(DateTime startDate, DateTime endDate, string category = "NORMAL") diff --git a/BMA.EHR.Application/Repositories/MinIOService.cs b/BMA.EHR.Application/Repositories/MinIOService.cs index bf74270f..ea470b27 100644 --- a/BMA.EHR.Application/Repositories/MinIOService.cs +++ b/BMA.EHR.Application/Repositories/MinIOService.cs @@ -155,40 +155,6 @@ namespace BMA.EHR.Application.Repositories } } - public async Task GetImageToFormFileAsync(string refId) - { - try - { - using var memoryStream = new MemoryStream(); - var request = new GetObjectRequest - { - BucketName = _bucketName, - Key = refId - }; - - using var response = await _s3Client.GetObjectAsync(request); - using var responseStream = response.ResponseStream; - - await responseStream.CopyToAsync(memoryStream); - - var finalBytes = memoryStream.ToArray(); - - var finalStream = new MemoryStream(finalBytes); - var fileName = Path.GetFileName(refId); - var contentType = response.Headers.ContentType ?? "image/jpeg"; - - return new FormFile(finalStream, 0, finalStream.Length, "file", fileName) - { - Headers = new HeaderDictionary(), - ContentType = contentType - }; - } - catch - { - throw; - } - } - public async Task DeleteFileAsync(Guid fileId) { try diff --git a/BMA.EHR.Application/Repositories/PermissionRepository.cs b/BMA.EHR.Application/Repositories/PermissionRepository.cs index a63207ec..27ee8696 100644 --- a/BMA.EHR.Application/Repositories/PermissionRepository.cs +++ b/BMA.EHR.Application/Repositories/PermissionRepository.cs @@ -10,7 +10,6 @@ using System.Net.Http.Headers; using Microsoft.Extensions.Configuration; using System.Security.Claims; using System.Net.Http.Json; -using BMA.EHR.Application.Responses.Leaves; namespace BMA.EHR.Application.Repositories { @@ -59,14 +58,9 @@ namespace BMA.EHR.Application.Repositories using (var client = new HttpClient()) { - client.DefaultRequestHeaders.Authorization = - new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = await client.GetAsync(apiPath); - if (!req.IsSuccessStatusCode) - { - throw new Exception("Error calling permission API"); - } var res = await req.Content.ReadAsStringAsync(); return res; } @@ -77,39 +71,6 @@ namespace BMA.EHR.Application.Repositories } } - public async Task GetPermissionWithActingAPIAsync(string action, string system) - { - try - { - var apiPath = $"{_configuration["API"]}/org/permission/dotnet-acting/{action}/{system}"; - - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = - new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var req = await client.GetAsync(apiPath); - if (!req.IsSuccessStatusCode) - { - throw new Exception("Error calling permission API"); - } - var apiResult = await req.Content.ReadAsStringAsync(); - //return res; - - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - return raw; - } - return null; - } - } - catch - { - throw; - } - } - public async Task GetPermissionOrgAPIAsync(string action, string system, string profileId) { try @@ -119,7 +80,7 @@ namespace BMA.EHR.Application.Repositories using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = await client.GetAsync(apiPath); var res = await req.Content.ReadAsStringAsync(); return res; diff --git a/BMA.EHR.Application/Repositories/PlacementRepository.cs b/BMA.EHR.Application/Repositories/PlacementRepository.cs index eb7c3617..49f1175c 100644 --- a/BMA.EHR.Application/Repositories/PlacementRepository.cs +++ b/BMA.EHR.Application/Repositories/PlacementRepository.cs @@ -2,40 +2,24 @@ using BMA.EHR.Domain.Models.Placement; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using System.Net.Http.Headers; -using Newtonsoft.Json; namespace BMA.EHR.Application.Repositories { - /// - /// Response model จาก Org API (check-isLeave) - /// - public class OrgProfileResult - { - public string citizenId { get; set; } = ""; - public string? profileId { get; set; } - public bool isLeave { get; set; } - public bool isActive { get; set; } - } - public class PlacementRepository : GenericRepository { #region " Fields " private readonly IApplicationDBContext _dbContext; private readonly IHttpContextAccessor _httpContextAccessor; - private readonly IConfiguration _configuration; #endregion #region " Constructor and Destructor " - public PlacementRepository(IApplicationDBContext dbContext, IHttpContextAccessor httpContextAccessor, IConfiguration configuration) : base(dbContext, httpContextAccessor) + public PlacementRepository(IApplicationDBContext dbContext, IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor) { _dbContext = dbContext; _httpContextAccessor = httpContextAccessor; - _configuration = configuration; } #endregion @@ -92,148 +76,6 @@ namespace BMA.EHR.Application.Repositories return data; } - /// - /// Job อัพเดทสถานะผู้สอบผ่านที่ลาออกไปแล้วแต่ยังไม่ส่งไปออกคำสั่ง - /// และอัพเดทบุคคลภายนอกที่เข้ามาอยู่ในระบบแล้ว - /// ทำงานทุกวันเวลา 05:00 น. - /// - public async Task UpdateStatusPlacementProfiles() - { - Console.WriteLine("[Job:UpdateStatusPlacementProfiles] === STARTED ==="); - - // 1. Query ทั้ง 2 กรณี: ทุกคนที่ยังไม่ DONE - var allCitizenIds = await _dbContext.Set() - .Where(p => !string.IsNullOrEmpty(p.CitizenId) - && p.PlacementStatus != "DONE" - // && p.CitizenId == "2536721883131" - ) - .Select(p => new { p.CitizenId, p.IsOfficer }) - .ToListAsync(); - - if (!allCitizenIds.Any()) - { - Console.WriteLine("[Job:UpdateStatusPlacementProfiles] No profiles to process"); - return; - } - - var officerCount = allCitizenIds.Count(x => x.IsOfficer == true); - var notOfficerCount = allCitizenIds.Count(x => x.IsOfficer == false); - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] พบข้าราชการ {officerCount} คน, บุคคลภายนอก {notOfficerCount} คน"); - - // 2. ส่ง citizenIds ทั้งหมดไป Org API ครั้งเดียว - var citizenIds = allCitizenIds.Select(x => x.CitizenId).Distinct().ToList(); - var apiUrl = $"{_configuration["API"]}/org/dotnet/check-isLeave"; - - List orgResults = new(); - - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - - var payload = new { citizenIds }; - var jsonPayload = JsonConvert.SerializeObject(payload); - var content = new StringContent(jsonPayload, System.Text.Encoding.UTF8, "application/json"); - - try - { - var response = await client.PostAsync(apiUrl, content); - var result = await response.Content.ReadAsStringAsync(); - - var responseObj = JsonConvert.DeserializeAnonymousType(result, new - { - status = 0, - message = "", - result = new List() - }); - - orgResults = responseObj?.result ?? new(); - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] Org API ตอบกลับ {orgResults.Count} รายการ"); - } - catch (Exception ex) - { - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] Call API failed: {ex.Message}"); - return; - } - } - - if (!orgResults.Any()) - { - Console.WriteLine("[Job:UpdateStatusPlacementProfiles] ไม่มีรายการต้องอัปเดต"); - Console.WriteLine("[Job:UpdateStatusPlacementProfiles] === COMPLETED ==="); - return; - } - - // 3. แยกข้อมูลตามเงื่อนไข - var leaveCitizenIds = orgResults.Where(x => x.isLeave).Select(x => x.citizenId).ToList(); - var inSystemProfiles = orgResults.Where(x => x.isActive && !x.isLeave && !string.IsNullOrEmpty(x.profileId)).ToList(); - - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] ลาออก {leaveCitizenIds.Count} รายการ, อยู่ที่ทะเบียนประวัติ {inSystemProfiles.Count} รายการ"); - - // 4. Split Batch Update (500 รายการ/batch) - var batchSize = 500; - var totalUpdated = 0; - - // 4.1 Update คนลาออก → IsOfficer = false - if (leaveCitizenIds.Any()) - { - var totalBatches = (int)Math.Ceiling((double)leaveCitizenIds.Count / batchSize); - for (int i = 0; i < totalBatches; i++) - { - var batch = leaveCitizenIds.Skip(i * batchSize).Take(batchSize).ToList(); - - var profilesToUpdate = await _dbContext.Set() - .Where(p => !string.IsNullOrEmpty(p.CitizenId) - && batch.Contains(p.CitizenId) - && p.IsOfficer == true) - .ToListAsync(); - - foreach (var profile in profilesToUpdate) - { - profile.profileId = null; - profile.IsOfficer = false; - } - - await _dbContext.SaveChangesAsync(); - totalUpdated += profilesToUpdate.Count; - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] [ลาออก] Batch {i + 1}/{totalBatches} → อัปเดต {profilesToUpdate.Count} รายการ"); - } - } - - // 4.2 Update คนที่อยู่ในทะเบียนประวัติ → profileId + IsOfficer = true - if (inSystemProfiles.Any()) - { - var totalBatches = (int)Math.Ceiling((double)inSystemProfiles.Count / batchSize); - for (int i = 0; i < totalBatches; i++) - { - var batch = inSystemProfiles.Skip(i * batchSize).Take(batchSize).ToList(); - var batchCitizenIds = batch.Select(x => x.citizenId).ToList(); - - var profilesToUpdate = await _dbContext.Set() - .Where(p => !string.IsNullOrEmpty(p.CitizenId) - && batchCitizenIds.Contains(p.CitizenId) - && p.IsOfficer == false) - .ToListAsync(); - - foreach (var profile in profilesToUpdate) - { - var orgProfile = batch.FirstOrDefault(x => x.citizenId == profile.CitizenId); - if (orgProfile != null) - { - profile.profileId = orgProfile.profileId; - profile.IsOfficer = true; - } - } - - await _dbContext.SaveChangesAsync(); - totalUpdated += profilesToUpdate.Count; - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] [เข้าระบบ] Batch {i + 1}/{totalBatches} → อัปเดต {profilesToUpdate.Count} รายการ"); - } - } - - Console.WriteLine($"[Job:UpdateStatusPlacementProfiles] อัปเดตรวมทั้งหมด {totalUpdated} รายการ"); - Console.WriteLine("[Job:UpdateStatusPlacementProfiles] === COMPLETED ==="); - } - #endregion } } diff --git a/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs index ce460b8d..b6932574 100644 --- a/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs @@ -5,7 +5,6 @@ using BMA.EHR.Domain.Shared; using Microsoft.AspNetCore.Hosting; using Microsoft.EntityFrameworkCore; using System.Text; -using System.Text.RegularExpressions; using static BMA.EHR.Domain.Extensions.DateTimeExtension; namespace BMA.EHR.Application.Repositories.Reports @@ -83,128 +82,76 @@ namespace BMA.EHR.Application.Repositories.Reports sb.Append(monthDiff == 0 ? "" : $"{monthDiff} เดือน "); sb.Append(dayDiff == 0 ? "" : $"{dayDiff} วัน "); } - var candidate = await _dbExamContext.Set() - .Where(x => x.Id == id) - .Include(p => p.PeriodExam) - .Include(p => p.Educations) - .Include(p => p.PositionExam) - .Include(p => p.ProfileImg) - .FirstOrDefaultAsync(); + var data = await _dbExamContext.Set().AsQueryable() + .Where(x => x.Id == id) + .Select(p => new + { + p.Id, + AvatarId = p.ProfileImg == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.ProfileImg.Id, + ExamIdenNumber = p.ExamIdenNumber == null ? "-" : p.ExamIdenNumber.ToThaiNumber(), + PositionName = p.PositionExam == null ? "-" : p.PositionExam.PositionName.ToThaiNumber(), + PositionLevelName = p.PositionExam == null ? "-" : p.PositionExam.PositionLevelName.ToThaiNumber(), + PeriodExamName = p.PeriodExam == null ? "-" : p.PeriodExam.Name.ToThaiNumber(), + PeriodExamRound = p.PeriodExam == null ? "-" : p.PeriodExam.Round.ToString().ToThaiNumber(), + PeriodExamYear = p.PeriodExam == null ? "-" : (p.PeriodExam.Year + 543).ToString().ToThaiNumber(), - if (candidate == null) + FullName = $"{p.PrefixName}{p.FirstName} {p.LastName}", + Religion = p.ReligionName == null ? "-" : p.ReligionName, + Nationality = p.Nationality == null ? "-" : p.Nationality, + DateOfBirth = p.DateOfBirth == null ? "-" : p.DateOfBirth.Value.ToThaiFullDate2().ToThaiNumber(), + Age = p.DateOfBirth == null ? "-" : p.DateOfBirth.Value.CalculateAgeStrV2(0, 0).ToThaiNumber(), + CitizenId = p.CitizenId == null ? "-" : p.CitizenId.ToThaiNumber(), + + EducationLevelExamName = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationLevelExamName.ToThaiNumber(), + EducationName = p.Educations.FirstOrDefault() == null ? null : (p.Educations.FirstOrDefault().EducationLevelExamName == "ปริญญาตรี" || p.Educations.FirstOrDefault().EducationLevelExamName == "ปริญญาโท" || p.Educations.FirstOrDefault().EducationLevelExamName == "ปริญญาเอก" ? p.Educations.FirstOrDefault().EducationName : null), + EducationMajor = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationMajor.ToThaiNumber(), + EducationLocation = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationLocation, + EducationEndDate = p.Educations.FirstOrDefault() == null || p.Educations.FirstOrDefault().EducationEndDate == null ? "-" : p.Educations.FirstOrDefault().EducationEndDate.Value.ToThaiFullDate2().ToThaiNumber(), + EducationScores = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationScores.ToThaiNumber(), + EducationType = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationType, + EducationLevelHighName = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationLevelHighName, + + OccupationPositionType = p.OccupationPositionType == "other" ? "ผู้ปฏิบัติงานอื่นในกรุงเทพมหานคร" : (p.OccupationPositionType == "temp" ? "ลูกจ้างชั่วคราว" : (p.OccupationPositionType == "prem" ? "ลูกจ้างประจำ" : "-")), + OccupationPosition = p.OccupationPosition == null ? "-" : p.OccupationPosition, + OccupationSalary = p.OccupationSalary == null ? "-" : p.OccupationSalary.Value.ToString("N0").ToThaiNumber(), + OccupationGroup = p.OccupationGroup == null ? "-" : p.OccupationGroup, + OccupationPile = p.OccupationPile == null ? "-" : p.OccupationPile, + OccupationOrg = p.OccupationOrg == null ? "-" : p.OccupationOrg, + OccupationTelephone = p.OccupationTelephone == null ? "-" : p.OccupationTelephone.ToThaiNumber(), + + CareersTotal = sb.ToString().ToThaiNumber(), + // Careers = p.Careers.Select(y => new + // { + // Position = y.Position, + // Type = y.Type, + // DurationStart = y.DurationStart.ToThaiShortDate2(), + // DurationEnd = y.DurationEnd.ToThaiShortDate2(), + // RangeDate = y.RangeDate, + // }).ToList(), + + RegistAddress = p.RegistAddress == null ? "-" : p.RegistAddress.ToThaiNumber(), + RegistProvinceName = p.RegistProvinceName == null ? "-" : p.RegistProvinceName, + RegistDistrictName = p.RegistDistrictName == null ? "-" : p.RegistDistrictName, + RegistSubDistrictName = p.RegistSubDistrictName == null ? "-" : p.RegistSubDistrictName, + RegistZipCode = p.RegistZipCode == null ? "-" : p.RegistZipCode.ToThaiNumber(), + CurrentAddress = p.CurrentAddress == null ? (p.RegistAddress == null ? "-" : p.RegistAddress.ToThaiNumber()) : p.CurrentAddress.ToThaiNumber(), + CurrentProvinceName = p.CurrentProvinceName == null ? (p.RegistProvinceName == null ? "-" : p.RegistProvinceName) : p.CurrentProvinceName, + CurrentDistrictName = p.CurrentDistrictName == null ? (p.RegistDistrictName == null ? "-" : p.RegistDistrictName) : p.CurrentDistrictName, + CurrentSubDistrictName = p.CurrentSubDistrictName == null ? (p.RegistSubDistrictName == null ? "-" : p.RegistSubDistrictName) : p.CurrentSubDistrictName, + CurrentZipCode = p.CurrentZipCode == null ? (p.RegistZipCode == null ? "-" : p.RegistZipCode.ToThaiNumber()) : p.CurrentZipCode.ToThaiNumber(), + Telephone = p.Telephone == null ? "-" : p.Telephone.ToThaiNumber(), + Email = p.Email == null ? "-" : p.Email, + + ContactFullName = $"{p.ContactPrefixName}{p.ContactFirstname} {p.ContactLastname}", + ContactRelations = p.ContactRelations == null ? "-" : p.ContactRelations, + ContactTel = p.ContactTel == null ? "-" : p.ContactTel.ToThaiNumber(), + + RegisterDate = p.RegisterDate == null ? "-" : p.RegisterDate.Value.ToThaiFullDate().ToThaiNumber(), + }) + .FirstOrDefaultAsync(); + if (data == null) throw new Exception(GlobalMessages.CandidateNotFound); - - List editorConfirmLists; - - var textOnly = string.IsNullOrEmpty(candidate.PeriodExam?.EditorConfirm) - ? null - : Regex.Replace( - candidate.PeriodExam.EditorConfirm, - "<[^>]+>", - string.Empty - ) - .Replace(" ", " ") - .Trim(); - - if (!string.IsNullOrEmpty(textOnly)) - { - // ลบข้อความทั้งหมดก่อน "1." เพื่อให้เริ่มต้นที่ข้อแรกเสมอ - var cleanedText = Regex.Replace(textOnly, @"^.*?1\.", "1.").Trim(); - - // ถ้าข้อ 3 จบด้วย "มาตรา 1374." แล้วเลข 4. ติดกับประโยค ให้แทรกขึ้นบรรทัดใหม่เป็นข้อ 4. - if (!cleanedText.Contains("\n4.") && Regex.IsMatch(cleanedText, @"1374\.\s*")) - { - cleanedText = Regex.Replace(cleanedText, @"1374\.\s*", "137\n4. "); - } - - // แยกข้อความเป็นแต่ละข้อ โดย split เมื่อเจอ pattern "ตัวเลข. " - // ใช้ lookahead (?=...) เพื่อไม่กินตัวเลขทิ้ง และให้ตัวเลขยังอยู่ในผลลัพธ์ - editorConfirmLists = Regex.Split(cleanedText, @"(?=\d+\. )") - .Where(s => !string.IsNullOrWhiteSpace(s)) - .Select(s => s.Replace("\n", "").Replace("\r", "").Trim()) - .ToList(); - } - else - { - editorConfirmLists = new List { "-" }; - } - - return new - { - candidate.Id, - AvatarId = candidate.ProfileImg?.Id ?? Guid.Empty, - ExamIdenNumber = candidate.ExamIdenNumber ?? "-", - PositionName = candidate.PositionExam?.PositionName ?? "-", - PositionLevelName = candidate.PositionExam?.PositionLevelName ?? "-", - PeriodExamName = candidate.PeriodExam?.Name ?? "-", - PeriodExamRound = candidate.PeriodExam?.Round.ToString() ?? "-", - PeriodExamYear = candidate.PeriodExam != null ? (candidate.PeriodExam.Year + 543).ToString() : "-", - FullName = $"{candidate.PrefixName}{candidate.FirstName} {candidate.LastName}", - Religion = candidate.ReligionName ?? "-", - Nationality = candidate.Nationality ?? "-", - DateOfBirth = candidate.DateOfBirth?.ToThaiFullDate2() ?? "-", - Age = candidate.DateOfBirth?.CalculateAgeStrV2(0, 0) ?? "-", - CitizenId = candidate.CitizenId ?? "-", - - EducationLevelExamName = candidate.Educations.FirstOrDefault()?.EducationLevelExamName ?? "-", - EducationName = (candidate.Educations.FirstOrDefault()?.EducationLevelExamName is "ปริญญาตรี" or "ปริญญาโท" or "ปริญญาเอก") - ? candidate.Educations.FirstOrDefault()?.EducationName - : null, - EducationMajor = candidate.Educations.FirstOrDefault()?.EducationMajor ?? "-", - EducationLocation = candidate.Educations.FirstOrDefault()?.EducationLocation ?? "-", - EducationEndDate = candidate.Educations.FirstOrDefault()?.EducationEndDate?.ToThaiFullDate2() ?? "-", - EducationScores = candidate.Educations.FirstOrDefault()?.EducationScores ?? "-", - EducationType = candidate.Educations.FirstOrDefault()?.EducationType ?? "-", - EducationLevelHighName = candidate.Educations.FirstOrDefault()?.EducationLevelHighName ?? "-", - - OccupationPositionType = candidate.OccupationPositionType == "other" ? "ผู้ปฏิบัติงานอื่นในกรุงเทพมหานคร" : - candidate.OccupationPositionType == "temp" ? "ลูกจ้างชั่วคราว" : - candidate.OccupationPositionType == "prem" ? "ลูกจ้างประจำ" : "-", - OccupationPosition = candidate.OccupationPosition ?? "-", - OccupationSalary = candidate.OccupationSalary.HasValue - ? (candidate.OccupationSalary.Value % 1 == 0 - ? candidate.OccupationSalary.Value.ToString("N0") - : candidate.OccupationSalary.Value.ToString("N2")) - : "-", - OccupationGroup = candidate.OccupationGroup ?? "-", - OccupationPile = candidate.OccupationPile ?? "-", - OccupationOrg = candidate.OccupationOrg ?? "-", - OccupationTelephone = candidate.OccupationTelephone ?? "-", - - CareersTotal = sb.ToString(), - - RegistAddress = candidate.RegistAddress ?? "-", - RegistProvinceName = candidate.RegistProvinceName ?? "-", - RegistDistrictName = candidate.RegistDistrictName ?? "-", - RegistSubDistrictName = candidate.RegistSubDistrictName ?? "-", - RegistZipCode = candidate.RegistZipCode ?? "-", - CurrentAddress = candidate.CurrentAddress ?? candidate.RegistAddress ?? "-", - CurrentProvinceName = candidate.CurrentProvinceName ?? candidate.RegistProvinceName ?? "-", - CurrentDistrictName = candidate.CurrentDistrictName ?? candidate.RegistDistrictName ?? "-", - CurrentSubDistrictName = candidate.CurrentSubDistrictName ?? candidate.RegistSubDistrictName ?? "-", - CurrentZipCode = candidate.CurrentZipCode ?? candidate.RegistZipCode ?? "-", - Telephone = candidate.Telephone ?? "-", - Email = candidate.Email ?? "-", - - ContactFullName = $"{candidate.ContactPrefixName}{candidate.ContactFirstname} {candidate.ContactLastname}", - ContactRelations = candidate.ContactRelations ?? "-", - ContactTel = candidate.ContactTel ?? "-", - - RegisterDate = candidate.RegisterDate?.ToThaiFullDate() ?? "-", - - IsBachelors = candidate.PositionExam != null && !string.IsNullOrEmpty(candidate.PositionExam.PositionLevelName) && candidate.PositionExam.PositionLevelName.Trim() == "ปฏิบัติการ" - ? new List - { - new { label = "ชื่อปริญญา", value = candidate.Educations.FirstOrDefault()?.EducationName ?? "-" }, - new { label = "สาขาวิชา/วิชาเอก", value = candidate.Educations.FirstOrDefault()?.EducationMajor ?? "-" } - } - : new List - { - new { label = "สาขาวิชา/วิชาเอก", value = candidate.Educations.FirstOrDefault()?.EducationMajor ?? "-" } - }, - - EditorConfirms = editorConfirmLists - }; + return data; } public async Task GetExamCareerCandidateAsync(Guid id) { @@ -229,10 +176,10 @@ namespace BMA.EHR.Application.Repositories.Reports { Position = item.Position, Type = item.Type, - DurationStart = item.DurationStart, - DurationEnd = item.DurationEnd, - RangeDate = item.RangeDate, - Index = retVal.ToString(), + DurationStart = item.DurationStart.ToThaiNumber(), + DurationEnd = item.DurationEnd.ToThaiNumber(), + RangeDate = item.RangeDate.ToThaiNumber(), + Index = retVal.ToString().ToThaiNumber(), }; data.Add(_data); retVal++; diff --git a/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs index a1dd7936..946fd41a 100644 --- a/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs @@ -18,7 +18,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using System.Globalization; using System.Net; using System.Net.Http.Headers; @@ -845,16 +844,13 @@ namespace BMA.EHR.Application.Repositories.Reports OcId = x.Request.OrganizationId // Organization ID }) .ToListAsync(); - var org = _userProfileRepository.GetOc(nodeId, node, AccessToken); - var organizationName = $"{(!string.IsNullOrEmpty(org.Child4) ? org.Child4 + "/" : "")}{(!string.IsNullOrEmpty(org.Child3) ? org.Child3 + "/" : "")}{(!string.IsNullOrEmpty(org.Child2) ? org.Child2 + "/" : "")}{(!string.IsNullOrEmpty(org.Child1) ? org.Child1 + "/" : "")}{org.Root ?? ""}"; + var insignia = (from r in data group r by new { OcId = r.OcId, InsigniaInitial = r.InsigniaInitial } into g select new { RowNo = 1, - DepartmentName = organizationName, - //_userProfileRepository.GetOc(g.Key.OcId, 0, AccessToken).Root, - //_organizationCommonRepository.GetOrganizationNameFullPath(g.Key.OcId, false, false), + DepartmentName = _userProfileRepository.GetOc(g.Key.OcId, 0, AccessToken).Root, //_organizationCommonRepository.GetOrganizationNameFullPath(g.Key.OcId, false, false), InsigniaInitial = g.Key.InsigniaInitial, G1Male = g.Sum(x => x.Gendor == "ชาย" && x.RequestInsigniaName == "เหรียญจักรพรรดิมาลา" ? 1 : 0).ToString().ToThaiNumber(), G1Female = g.Sum(x => x.Gendor == "หญิง" && x.RequestInsigniaName == "เหรียญจักรพรรดิมาลา" ? 1 : 0).ToString().ToThaiNumber(), @@ -893,7 +889,7 @@ namespace BMA.EHR.Application.Repositories.Reports select new { RowNo = 1, - DepartmentName = _userProfileRepository.GetOc(g.Key.OcId, 0, AccessToken)?.Root ?? "-", //_organizationCommonRepository.GetOrganizationNameFullPath(g.Key.OcId, false, false), + DepartmentName = _userProfileRepository.GetOc(g.Key.OcId, 0, AccessToken).Root, //_organizationCommonRepository.GetOrganizationNameFullPath(g.Key.OcId, false, false), G1Male = g.Sum(x => x.Gendor == "ชาย" && x.RequestInsigniaName == "เหรียญจักรพรรดิมาลา" ? 1 : 0), G1Female = g.Sum(x => x.Gendor == "หญิง" && x.RequestInsigniaName == "เหรียญจักรพรรดิมาลา" ? 1 : 0), G2Male = g.Sum(x => x.Gendor == "ชาย" ? 1 : 0), @@ -1004,16 +1000,6 @@ namespace BMA.EHR.Application.Repositories.Reports r.FirstName, r.LastName, r.Gender, - r.Root, - r.RootId, - r.Child1, - r.Child1Id, - r.Child2, - r.Child2Id, - r.Child3, - r.Child3Id, - r.Child4, - r.Child4Id, r.RequestInsignia.Id, r.Request.OrganizationId }) @@ -1024,16 +1010,6 @@ namespace BMA.EHR.Application.Repositories.Reports ProfileId = group.Key.ProfileId, FullName = $"{group.Key.Prefix}{group.Key.FirstName} {group.Key.LastName}", Gender = group.Key.Gender, - Root = group.Key.Root ?? "", - RootId = group.Key.RootId, - Child1 = group.Key.Child1 ?? "", - Child1Id = group.Key.Child1Id, - Child2 = group.Key.Child2 ?? "", - Child2Id = group.Key.Child2Id, - Child3 = group.Key.Child3 ?? "", - Child3Id = group.Key.Child3Id, - Child4 = group.Key.Child4 ?? "", - Child4Id = group.Key.Child4Id, Male = group.Count(r => r.Gender == "Male"), // Count male entries Female = group.Count(r => r.Gender == "Female"), // Count female entries InsigniaId = group.Key.Id, @@ -1059,16 +1035,6 @@ namespace BMA.EHR.Application.Repositories.Reports ProfileId = Guid.Parse("00000000-0000-0000-0000-000000000000"), FullName = "", Gender = "", - Root = "", - RootId = (Guid?)Guid.Parse("00000000-0000-0000-0000-000000000000"), - Child1 = "", - Child1Id = (Guid?)Guid.Parse("00000000-0000-0000-0000-000000000000"), - Child2 = "", - Child2Id = (Guid?)Guid.Parse("00000000-0000-0000-0000-000000000000"), - Child3 = "", - Child3Id = (Guid?)Guid.Parse("00000000-0000-0000-0000-000000000000"), - Child4 = "", - Child4Id = (Guid?)Guid.Parse("00000000-0000-0000-0000-000000000000"), Male = 0, Female = 0, InsigniaId = ins.InsigniaId, @@ -1115,60 +1081,6 @@ namespace BMA.EHR.Application.Repositories.Reports return s_data; } - public async Task GeInsigniaRequestProfiles(Guid id) - { - var profile = await _dbContext.Set() - .Where(x => x.Id == id) - .Select(x => new - { - Fullname = $"{x.Prefix}{x.FirstName} {x.LastName}", - Position = x.Position ?? "", - Oc = (x.Child4 == null ? "" : x.Child4 + " ") + - (x.Child3 == null ? "" : x.Child3 + " ") + - (x.Child2 == null ? "" : x.Child2 + " ") + - (x.Child1 == null ? "" : x.Child1 + " ") + - (x.Root == null ? "" : x.Root), - BirthDate = x.BirthDate == null ? "" : x.BirthDate.Value.ToThaiShortDate().ToString().ToThaiNumber(), - DateAppoint = x.DateAppoint == null ? "" : x.DateAppoint.Value.ToThaiShortDate().ToString().ToThaiNumber(), - ProfileId = x.ProfileId - }) - .FirstOrDefaultAsync(); - - if (profile == null) - throw new Exception(GlobalMessages.DataNotFound); - - var profileSalarys = await _userProfileRepository.GetProfileSalaryById(profile.ProfileId, AccessToken); - var salarys = profileSalarys.Select(x => new - { - DateAffect = x.DateAffect == null ? "" : x.DateAffect.ToThaiShortDate().ToString().ToThaiNumber(), - Position = x.Position ?? "", - Root = x.Root, - Child1 = x.Child1, - Child2 = x.Child2, - Child3 = x.Child3, - Child4 = x.Child4, - Oc = (x.Child4 == null ? "" : x.Child4 + " ") + - (x.Child3 == null ? "" : x.Child3 + " ") + - (x.Child2 == null ? "" : x.Child2 + " ") + - (x.Child1 == null ? "" : x.Child1 + " ") + - (x.Root == null ? "" : x.Root), - Age = x.Age == null ? "" : x.Age.ToString().ToThaiNumber(), - Amount = x.Amount == null ? "" : x.Amount.ToString("N0", new CultureInfo("th-TH")).ToThaiNumber(), - Remark = x.Remark == null ? "" : x.Remark.ToThaiNumber(), - }).ToList(); - - var result = new - { - profile.Fullname, - profile.Position, - profile.Oc, - profile.BirthDate, - profile.DateAppoint, - Salarys = salarys - }; - return result; - } - //47-บัญชีระดับผลการประเมินผลการปฏิบัติราชการในรอบ 5 ปี public async Task GetEvaluationResultReport(Guid id, string type = null, int node = -1, Guid nodeId = default) { @@ -1236,7 +1148,7 @@ namespace BMA.EHR.Application.Repositories.Reports var _apiUrl = $"{_baseAPI}/org/unauthorize/calculateEvaluation/{type}"; using (var _client = new HttpClient()) { - _client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + _client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await _client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -1255,7 +1167,7 @@ namespace BMA.EHR.Application.Repositories.Reports if (matchedData != null) { resultList.Add(new - { + { rowNo = seq++.ToString().ToThaiNumber(), d.ProfileId, d.FullName, @@ -1341,104 +1253,6 @@ namespace BMA.EHR.Application.Repositories.Reports return resultList; } - //47-บัญชีระดับผลการประเมินผลการปฏิบัติราชการในรอบ 5 ปี NEW - public async Task GetEvaluationResult5YearReport(Guid id, string type = null, int node = -1, Guid nodeId = default) - { - var period = await _dbContext.Set() - .FirstOrDefaultAsync(x => x.Id == id); - if (period == null) - throw new Exception(GlobalMessages.InsigniaPeriodNotFound); - - var data_insigniaQuery = _dbContext.Set() - .Where(x => x.Request.Period.Id == period.Id) - .Where(x => x.IsApprove == true) - .Where(x => x.Status == "PENDING") - .Where(x => x.RequestInsignia.InsigniaType != null); - - if (type == "officer") - { - data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType == "officer"); - } - else if (type == "employee") - { - data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType == "employee"); - } - - - switch (node) - { - case 0: - data_insigniaQuery = data_insigniaQuery.Where(r => r.RootDnaId == nodeId); - break; - - case 1: - data_insigniaQuery = data_insigniaQuery.Where(r => r.Child1DnaId == nodeId); - break; - - case 2: - data_insigniaQuery = data_insigniaQuery.Where(r => r.Child2DnaId == nodeId); - break; - - case 3: - data_insigniaQuery = data_insigniaQuery.Where(r => r.Child3DnaId == nodeId); - break; - - case 4: - data_insigniaQuery = data_insigniaQuery.Where(r => r.Child4DnaId == nodeId); - break; - - default: - break; - } - var data = await data_insigniaQuery - .Select(x => new - { - ProfileId = x.ProfileId, - FullName = $"{x.Prefix}{x.FirstName} {x.LastName}", - RequestInsigniaName = x.RequestInsignia.Name, // Name of the Insignia - Reason = x.Reason, - Agency = x.Root, - ResultAPR1 = x.APR1, - ResultOCT1 = x.OCT1, - ResultAPR2 = x.APR2, - ResultOCT2 = x.OCT2, - ResultAPR3 = x.APR3, - ResultOCT3 = x.OCT3, - ResultAPR4 = x.APR4, - ResultOCT4 = x.OCT4, - ResultAPR5 = x.APR5, - ResultOCT5 = x.OCT5 - }) - .ToListAsync(); - - var seq = 1; - var resultList = new List(); - foreach (var d in data) - { - resultList.Add(new - { - rowNo = seq++.ToString().ToThaiNumber(), - d.ProfileId, - d.FullName, - d.RequestInsigniaName, - Agency = d.Agency, - ResultAPR1 = d.ResultAPR1 ?? "-", - ResultOCT1 = d.ResultOCT1 ?? "-", - ResultAPR2 = d.ResultAPR2 ?? "-", - ResultOCT2 = d.ResultOCT2 ?? "-", - ResultAPR3 = d.ResultAPR3 ?? "-", - ResultOCT3 = d.ResultOCT3 ?? "-", - ResultAPR4 = d.ResultAPR4 ?? "-", - ResultOCT4 = d.ResultOCT4 ?? "-", - ResultAPR5 = d.ResultAPR5 ?? "-", - ResultOCT5 = d.ResultOCT5 ?? "-", - Remark = d.Reason ?? "-" - }); - } - - return resultList; - } - //noti ยื่นเสนอคน public async Task NotifyInsignia() { @@ -1575,53 +1389,7 @@ namespace BMA.EHR.Application.Repositories.Reports } } - public void CalculateInsigniaRequestBkkByType(string type = "officer") - { - CalInsigniaRequestBkkByType(type).GetAwaiter().GetResult(); - } - //คำนวนผู้ได้รับเครื่องราชฯ - public async Task CalInsigniaRequestBkkByType(string type = "officer") - { - var insigniaPeriods = await _dbContext.Set() - .Include(x => x.InsigniaRequests) - .AsQueryable() - .ToListAsync(); - insigniaPeriods = insigniaPeriods - .Where(x => x.StartDate <= DateTime.Now.Date && x.InsigniaRequests.Where(x => x.ProfileType!.ToLower().Trim() == type.Trim().ToLower()).Count() == 0).ToList(); - - foreach (var insigniaPeriod in insigniaPeriods) - { - var organizations = await _userProfileRepository.GetActiveRootLatestAsync(AccessToken); - if (organizations == null) - continue; - insigniaPeriod.RevisionId = Guid.Parse(organizations[0].OrgRevisionId); - foreach (var organization in organizations) - { - if (organization == null) - continue; - - var result = await _repositoryInsignia.GetInsigniaRequestByTypeAsync(insigniaPeriod.Id, organization.Id, type); - if (result != null) - { - Guid period = result.PeriodId; - string requestStatus = result.RequestStatus; - var candidate = await _repositoryInsignia.GetInsigniaCandidateBKKByTypeAsync(insigniaPeriod.Id, organization.Id, type); - // ตรวจสอบว่ารายการอยู่ใน table insignia_request_new - if (requestStatus == null) - { - // บันทึกรายชื่อ - if (candidate != null) - await _repositoryInsignia.InsertCandidate(period, organization.Id, organization.OrgRootName, candidate, type); - } - - - } - } - } - } - - public async Task CalInsignaiRequestBkk() { var insigniaPeriods = await _dbContext.Set() @@ -1662,8 +1430,6 @@ namespace BMA.EHR.Application.Repositories.Reports } } } - - public async Task GetKhr5TotalReport(Guid id, string type = null, int node = -1, Guid nodeId = default) { var period = await _dbContext.Set() @@ -1681,11 +1447,11 @@ namespace BMA.EHR.Application.Repositories.Reports if (type == "officer") { - data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "officer"); + data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "OFFICER"); } else if (type == "employee") { - data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "employee"); + data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "EMPLOYEE"); } switch (node) @@ -1754,11 +1520,11 @@ namespace BMA.EHR.Application.Repositories.Reports if (type == "officer") { - data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "officer"); + data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "OFFICER"); } else if (type == "employee") { - data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "employee"); + data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "EMPLOYEE"); } switch (node) @@ -1794,7 +1560,6 @@ namespace BMA.EHR.Application.Repositories.Reports RequestInsigniaName = x.RequestInsignia.Name, IsApprove = x.IsApprove, InsigniaInitial = $"{x.RequestInsignia.Name}({x.RequestInsignia.ShortName})", // Insignia's full name and short name - DatePayment = x.DatePayment, OcId = x.Root }).ToListAsync(); var insignia = (from r in data @@ -1805,10 +1570,8 @@ namespace BMA.EHR.Application.Repositories.Reports DepartmentName = g.Key.OcId, InsigniaTypeName = g.Key.InsigniaTypeName, RequestInsigniaName = g.Key.RequestInsigniaName, - /* Pending = g.Sum(x => x.IsApprove == false ? 1 : 0), - Done = g.Sum(x => x.IsApprove == true ? 1 : 0),*/ - Pending = g.Sum(x => x.DatePayment == null ? 1 : 0), - Done = g.Sum(x => x.DatePayment != null ? 1 : 0), + Pending = g.Sum(x => x.IsApprove == false ? 1 : 0), + Done = g.Sum(x => x.IsApprove == true ? 1 : 0), Remark = "", }).ToList(); @@ -1830,11 +1593,11 @@ namespace BMA.EHR.Application.Repositories.Reports if (type == "officer") { - data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "officer"); + data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "OFFICER"); } else if (type == "employee") { - data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "employee"); + data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "EMPLOYEE"); } switch (node) @@ -1867,7 +1630,7 @@ namespace BMA.EHR.Application.Repositories.Reports { CitizenId = x.CitizenId, Prefix = x.Prefix, - FullName = $"{x.FirstName} {x.LastName}", + FullName = $"{x.Prefix}{x.FirstName} {x.LastName}", PosTypeName = x.PosTypeName, PosLevelName = x.PosLevelName, Position = x.Position, diff --git a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs index 8ad504a9..1092385f 100644 --- a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs @@ -51,7 +51,7 @@ namespace BMA.EHR.Application.Repositories.Reports using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, api_url); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -161,7 +161,7 @@ namespace BMA.EHR.Application.Repositories.Reports using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, api_url); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -433,7 +433,7 @@ namespace BMA.EHR.Application.Repositories.Reports using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, api_url); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -642,7 +642,7 @@ namespace BMA.EHR.Application.Repositories.Reports using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, api_url); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); @@ -894,7 +894,7 @@ namespace BMA.EHR.Application.Repositories.Reports using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var req = new HttpRequestMessage(HttpMethod.Get, api_url); var res = await client.SendAsync(req); var result = await res.Content.ReadAsStringAsync(); diff --git a/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs index 6ad5a61a..48abbadd 100644 --- a/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs @@ -87,7 +87,7 @@ namespace BMA.EHR.Application.Repositories.Reports using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -192,7 +192,7 @@ namespace BMA.EHR.Application.Repositories.Reports }).ToList(); } string SignDate = retireHistorys.SignDate != null ? DateTime.Parse(retireHistorys.SignDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : "-"; - return new { SignDate, Detail = retireHistorys.Detail.ToThaiNumber(), retireHistorys.Id, retireHistorys.CreatedAt, Year = retireHistorys.Year.ToThaiYear().ToString().ToThaiNumber(), retireHistorys.Round, retireHistorys.Type, retireHistorys.TypeReport, Total = retireHistorys.Total.ToString().ToThaiNumber(), profiles = mapProfiles }; + return new { SignDate, retireHistorys.Detail, retireHistorys.Id, retireHistorys.CreatedAt, Year = retireHistorys.Year.ToThaiYear().ToString().ToThaiNumber(), retireHistorys.Round, retireHistorys.Type, retireHistorys.TypeReport, Total = retireHistorys.Total.ToString().ToThaiNumber(), profiles = mapProfiles }; } } else @@ -274,15 +274,13 @@ namespace BMA.EHR.Application.Repositories.Reports { if (retire.TypeReport == null) { - profile_retire = profile_retire - .OrderBy(x => string.IsNullOrEmpty(x.root) ? int.MaxValue : rootOrder.ToObject>().IndexOf(x.root)) + profile_retire = profile_retire.OrderBy(x => rootOrder.ToObject>().IndexOf(x.root)) .ThenBy(x => child1Order.ToObject>().IndexOf(x.child1 ?? "")) .ThenBy(x => child2Order.ToObject>().IndexOf(x.child2 ?? "")) .ThenBy(x => child3Order.ToObject>().IndexOf(x.child3 ?? "")) .ThenBy(x => child4Order.ToObject>().IndexOf(x.child4 ?? "")) .ThenBy(x => posTypeNameOrder.ToObject>().IndexOf(x.posTypeName ?? "")) - .ThenBy(x => posLevelNameOrder.ToObject>().IndexOf(x.posLevelName ?? "")) - .ThenBy(x => x.posNo).ToList(); + .ThenBy(x => posLevelNameOrder.ToObject>().IndexOf(x.posLevelName ?? "")).ToList(); } mapProfiles = profile_retire.Select((profile, index) => { @@ -312,7 +310,7 @@ namespace BMA.EHR.Application.Repositories.Reports root = (isDuplicateRoot ? "" : profile.root + "\n") + (isDuplicateHospital || !hospital.ToObject>().Contains(profile.child1) ? "" : profile.child1 + "\n") + (isDuplicatePosType ? "" : $"ตำแหน่งประเภท{profile.posTypeName}" + "\n") + - (isDuplicatePosLevel ? "" : $"ระดับ{profile.posLevelName}").ToThaiNumber(), + (isDuplicatePosLevel ? "" : $"ระดับ{profile.posLevelName}"), child = (profile.posExecutiveName == null ? "" : profile.posExecutiveName + "\n") + (profile.child4 == null ? "" : profile.child4 + "\n") + (profile.child3 == null ? "" : profile.child3 + "\n") + @@ -326,7 +324,7 @@ namespace BMA.EHR.Application.Repositories.Reports }).ToList(); } string SignDate = retire.SignDate != null ? DateTime.Parse(retire.SignDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : "-"; - return new { SignDate, Detail = retire.Detail.ToThaiNumber(), retire.Id, retire.CreatedAt, Year = retire.Year.ToThaiYear().ToString().ToThaiNumber(), retire.Round, retire.Type, retire.TypeReport, Total = profile_retire.Count.ToString().ToThaiNumber(), profiles = mapProfiles }; + return new { SignDate, retire.Detail, retire.Id, retire.CreatedAt, Year = retire.Year.ToThaiYear().ToString().ToThaiNumber(), retire.Round, retire.Type, retire.TypeReport, Total = profile_retire.Count.ToString().ToThaiNumber(), profiles = mapProfiles }; } } #endregion @@ -505,7 +503,6 @@ namespace BMA.EHR.Application.Repositories.Reports p.CommanderRejectReason, p.CommanderRejectDate, p.RemarkHorizontal, - Type = "OFFICER" }) .FirstOrDefaultAsync(); if (data == null) @@ -543,130 +540,10 @@ namespace BMA.EHR.Application.Repositories.Reports p.CommanderRejectReason, p.CommanderRejectDate, p.RemarkHorizontal, - Type = "EMPLOYEE", }) .FirstOrDefaultAsync(); if (data == null) return null; - - var approverPositionExecutiveName = "..............."; - var approverStatus = "☐ อนุญาต"; - var approverRejectStatus = "☐ ยับยั้งการลาออกไว้จนถึงวันที่..................."; - var approver = "..................."; - var approverPosition = "..................."; - - var diffDate = "☐ ไม่น้อยกว่า ๓๐ วัน ☐ น้อยกว่า ๓๐ วัน"; - if (data.SendDate.HasValue && data.ActiveDate.HasValue) - { - var time = data.ActiveDate.Value - data.SendDate.Value; - var day = time.TotalDays; - if (day < 30) - { - diffDate = "☐ ไม่น้อยกว่า ๓๐ วัน ☑ น้อยกว่า ๓๐ วัน"; - } - else - { - diffDate = "☑ ไม่น้อยกว่า ๓๐ วัน ☐ น้อยกว่า ๓๐ วัน"; - } - } - - var commanderDateUpdate = "วันที่..................."; - var commanderStatus = "☐ อนุญาต ตั้งแต่วันที่..................."; - var commanderCommentApprove = "..................."; - var commanderRejectStatus = "☐ ยับยั้งการลาออกไว้จนถึงวันที่..................."; - var commanderCommentReject = "..................."; - var commander = "..................."; - var commanderPosition = "..................."; - - if (data.Type == "OFFICER") - { - var Approver = _dbContext.Set() - .Where(x => x.RetirementResign.Id == data.Id && x.ApproveType == "APPROVER") - .ToList(); - var Commander = _dbContext.Set() - .Where(x => x.RetirementResign.Id == data.Id && x.ApproveType == "COMMANDER") - .OrderByDescending(x => x.Seq) - .ToList(); - if (Approver.Count > 0) - { - approverPositionExecutiveName = Approver[0].PositionExecutiveName; - approverStatus = Approver[0].ApproveStatus == "APPROVE" ? "☑ อนุญาต" : approverStatus; - approverRejectStatus = Approver[0].ApproveStatus == "REJECT" - ? $"☑ ยับยั้งการลาออกไว้จนถึง{(Approver[0].RejectDate != null ? DateTime.Parse(Approver[0].RejectDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : "วันที่...................")}" - : approverRejectStatus; - approver = $"{Approver[0].Prefix}{Approver[0].FirstName} {Approver[0].LastName}"; - approverPosition = Approver[0].PositionName; - } - if (Commander.Count > 0) - { - commanderDateUpdate = Commander.Count > 1 - ? Commander[1].LastUpdatedAt != null - ? DateTime.Parse(Commander[1].LastUpdatedAt.ToString()).ToThaiFullDate().ToString().ToThaiNumber() - : commanderDateUpdate - : Commander[0].LastUpdatedAt != null - ? DateTime.Parse(Commander[0].LastUpdatedAt.ToString()).ToThaiFullDate().ToString().ToThaiNumber() - : commanderDateUpdate; - commanderStatus = Commander[0].ApproveStatus == "APPROVE" - ? $"☑ อนุญาต ตั้งแต่{(Commander[0].LastUpdatedAt != null ? DateTime.Parse(Commander[0].LastUpdatedAt.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : "วันที่...................")}" - : commanderStatus; - commanderCommentApprove = Commander[0].ApproveStatus == "APPROVE" - ? !string.IsNullOrWhiteSpace(Commander[0].Comment) ? Commander[0].Comment : commanderCommentApprove - : commanderCommentApprove; - commanderRejectStatus = Commander[0].ApproveStatus == "REJECT" - ? $"☑ ยับยั้งการลาออกไว้จนถึง{(Commander[0].RejectDate != null ? DateTime.Parse(Commander[0].RejectDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : "วันที่...................")}" - : approverRejectStatus; - commanderCommentReject = Commander[0].ApproveStatus == "REJECT" - ? !string.IsNullOrWhiteSpace(Commander[0].Comment) ? Commander[0].Comment : commanderCommentReject - : commanderCommentReject; - commander = $"{Commander[0].Prefix}{Commander[0].FirstName} {Commander[0].LastName}"; - commanderPosition = Commander[0].PositionName; - } - } - else - { - var EmpApproves = _dbContext.Set() - .Where(x => x.RetirementResignEmployee.Id == data.Id && x.ApproveType == "APPROVER") - .ToList(); - var EmpCommander = _dbContext.Set() - .Where(x => x.RetirementResignEmployee.Id == data.Id && x.ApproveType == "COMMANDER") - .OrderByDescending(x => x.Seq) - .ToList(); - if (EmpApproves.Count > 0) - { - approverPositionExecutiveName = EmpApproves[0].PositionExecutiveName; - approverStatus = EmpApproves[0].ApproveStatus == "APPROVE" ? "☑ อนุญาต" : approverStatus; - approverRejectStatus = EmpApproves[0].ApproveStatus == "REJECT" - ? $"☑ ยับยั้งการลาออกไว้จนถึง{(EmpApproves[0].RejectDate != null ? DateTime.Parse(EmpApproves[0].RejectDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : "วันที่...................")}" - : approverRejectStatus; - approver = $"{EmpApproves[0].Prefix}{EmpApproves[0].FirstName} {EmpApproves[0].LastName}"; - approverPosition = EmpApproves[0].PositionName; - } - if (EmpCommander.Count > 0) - { - commanderDateUpdate = EmpCommander.Count > 1 - ? EmpCommander[1].LastUpdatedAt != null - ? DateTime.Parse(EmpCommander[1].LastUpdatedAt.ToString()).ToThaiFullDate().ToString().ToThaiNumber() - : commanderDateUpdate - : EmpCommander[0].LastUpdatedAt != null - ? DateTime.Parse(EmpCommander[0].LastUpdatedAt.ToString()).ToThaiFullDate().ToString().ToThaiNumber() - : commanderDateUpdate; - commanderStatus = EmpCommander[0].ApproveStatus == "APPROVE" - ? $"☑ อนุญาต ตั้งแต่{(EmpCommander[0].LastUpdatedAt != null ? DateTime.Parse(EmpCommander[0].LastUpdatedAt.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : "วันที่...................")}" - : commanderStatus; - commanderCommentApprove = EmpCommander[0].ApproveStatus == "APPROVE" - ? !string.IsNullOrWhiteSpace(EmpCommander[0].Comment) ? EmpCommander[0].Comment : commanderCommentApprove - : commanderCommentApprove; - commanderRejectStatus = EmpCommander[0].ApproveStatus == "REJECT" - ? $"☑ ยับยั้งการลาออกไว้จนถึง{(EmpCommander[0].RejectDate != null ? DateTime.Parse(EmpCommander[0].RejectDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : "วันที่...................")}" - : approverRejectStatus; - commanderCommentReject = EmpCommander[0].ApproveStatus == "REJECT" - ? !string.IsNullOrWhiteSpace(EmpCommander[0].Comment) ? EmpCommander[0].Comment : commanderCommentReject - : commanderCommentReject; - commander = $"{EmpCommander[0].Prefix}{EmpCommander[0].FirstName} {EmpCommander[0].LastName}"; - commanderPosition = EmpCommander[0].PositionName; - } - } - var _data = new { data.Id, @@ -701,19 +578,6 @@ namespace BMA.EHR.Application.Repositories.Reports data.CommanderRejectReason, CommanderRejectDate = string.IsNullOrEmpty(data.CommanderRejectDate.ToString()) ? string.Empty : DateTime.Parse(data.CommanderRejectDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber(), data.RemarkHorizontal, - dear = approverPositionExecutiveName, - approverStatus, - approverRejectStatus, - approver, - approverPosition, - diffDate, - commanderDateUpdate, - commanderStatus, - commanderCommentApprove, - commanderRejectStatus, - commanderCommentReject, - commander, - commanderPosition }; return _data; diff --git a/BMA.EHR.Application/Repositories/Reports/TransferReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/TransferReportRepository.cs index d58e63a0..e2efc5bb 100644 --- a/BMA.EHR.Application/Repositories/Reports/TransferReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/TransferReportRepository.cs @@ -37,8 +37,7 @@ namespace BMA.EHR.Application.Repositories.Reports return new { - //CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM")).ToThaiFullDate().ToString().ToThaiNumber().Remove(0, 15), - CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).ToThaiFullDate2().ToString().ToThaiNumber(), + CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM")).ToThaiFullDate().ToString().ToThaiNumber().Remove(0, 15), Name = $"{data.prefix}{data.firstName} {data.lastName}", }; } @@ -53,7 +52,7 @@ namespace BMA.EHR.Application.Repositories.Reports return new { - CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).ToThaiFullDate2().ToString().ToThaiNumber(), + CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM")).ToThaiFullDate().ToString().ToThaiNumber().Remove(0, 15), Subject = $"ข้าราชการกรุงเทพมหานครสามัญขอโอน", Name = $"{data.prefix}{data.firstName} {data.lastName}", }; @@ -68,7 +67,7 @@ namespace BMA.EHR.Application.Repositories.Reports .FirstOrDefaultAsync(); return new { - CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).ToThaiFullDate2().ToString().ToThaiNumber(), + CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM")).ToThaiFullDate().ToString().ToThaiNumber().Remove(0, 15), Subject = $"ข้าราชการขอโอน", Name = $"{data.prefix}{data.firstName} {data.lastName}", Location = $"สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร ๑๗๓ ถนนดินสอ กทม. ๑๐๒๐๐", @@ -85,7 +84,7 @@ namespace BMA.EHR.Application.Repositories.Reports return new { - CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).ToThaiFullDate2().ToString().ToThaiNumber(), + CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM")).ToThaiFullDate().ToString().ToThaiNumber().Remove(0, 15), Subject = $"ข้าราชการกรุงเทพมหานครสามัญขอโอน", Subject2 = $"ตรวจสอบหนี้สิน และภาระผูกพันกับกรุงเทพมหานครของข้าราชการ", Subject3 = $"ตรวจสอบหนี้สินและภาระผูกพันของข้าราชการ", @@ -106,7 +105,7 @@ namespace BMA.EHR.Application.Repositories.Reports return new { - CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).ToThaiFullDate2().ToString().ToThaiNumber(), + CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM")).ToThaiFullDate().ToString().ToThaiNumber().Remove(0, 15), Subject = $"ข้าราชการกรุงเทพมหานครสามัญขอโอน", Subject2 = $"ตรวจสอบพฤติการณ์ทางวินัย และภาระหนี้สิน (เงินกู้สวัสดิการข้าราชการ) ของข้าราชการ", Subject3 = $"ตรวจสอบภาระผูกพันกับกรุงเทพมหานครเกี่ยวกับการลาศึกษา อบรม ของข้าราชการ", @@ -127,7 +126,7 @@ namespace BMA.EHR.Application.Repositories.Reports return new { - CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).ToThaiFullDate2().ToString().ToThaiNumber(), + CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM")).ToThaiFullDate().ToString().ToThaiNumber().Remove(0, 15), Subject = $"ข้าราชการกรุงเทพมหานครสามัญขอโอน", Subject2 = $"ตรวจสอบพฤติการณ์ทางวินัย และภาระหนี้สิน (เงินกู้สวัสดิการข้าราชการ) ของข้าราชการ", Subject3 = $"ตรวจสอบภาระผูกพันกับกรุงเทพมหานครเกี่ยวกับการลาศึกษา อบรม ของข้าราชการ", diff --git a/BMA.EHR.Application/Repositories/RetirementEmployeeRepository.cs b/BMA.EHR.Application/Repositories/RetirementEmployeeRepository.cs deleted file mode 100644 index 160888ea..00000000 --- a/BMA.EHR.Application/Repositories/RetirementEmployeeRepository.cs +++ /dev/null @@ -1,1027 +0,0 @@ -using BMA.EHR.Application.Common.Interfaces; -using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Domain.Models.Notifications; -using BMA.EHR.Domain.Models.Retirement; -using BMA.EHR.Domain.Shared; -using Microsoft.AspNetCore.Http; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Newtonsoft.Json; -using System.Net.Http.Headers; -using System.Net.Http.Json; -using System.Security.Claims; -using System.Text; - -namespace BMA.EHR.Application.Repositories -{ - public class RetirementEmployeeRepository : GenericRepository - { - private readonly IApplicationDBContext _dbContext; - private readonly IHttpContextAccessor _httpContextAccessor; - private readonly NotificationRepository _repositoryNoti; - private readonly IConfiguration _configuration; - private readonly string URL = string.Empty; - public RetirementEmployeeRepository(IApplicationDBContext dbContext, - NotificationRepository repositoryNoti, - IHttpContextAccessor httpContextAccessor, - UserProfileRepository userProfileRepository, - IConfiguration configuration) : base(dbContext, httpContextAccessor) - { - _dbContext = dbContext; - _httpContextAccessor = httpContextAccessor; - _repositoryNoti = repositoryNoti; - _configuration = configuration; - URL = _configuration["VITE_URL_MGT"]; - } - - #region " Properties " - private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value; - private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; - private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - - #endregion - - //ปลดออก - public async Task NotifyDischarge() - { - var cronjobNotis = await _dbContext.Set() - .Include(x => x.Profile) - .ThenInclude(x => x.Prefix) - .Where(x => x.Date != null && x.Date.Value.Date == DateTime.Now.Date) - .AsQueryable() - .ToListAsync(); - foreach (var cronjobNoti in cronjobNotis) - { - cronjobNoti.Profile.IsLeave = true; - cronjobNoti.Profile.LeaveReason = "DISCHARGE"; - cronjobNoti.Profile.LeaveDate = DateTime.Now; - } - await _dbContext.SaveChangesAsync(); - } - - //ไล่ออก - public async Task NotifyExpulsion() - { - var cronjobNotis = await _dbContext.Set() - .Include(x => x.Profile) - .ThenInclude(x => x.Prefix) - .Where(x => x.Date != null && x.Date.Value.Date == DateTime.Now.Date) - .AsQueryable() - .ToListAsync(); - foreach (var cronjobNoti in cronjobNotis) - { - cronjobNoti.Profile.IsLeave = true; - cronjobNoti.Profile.LeaveReason = "DISMISS"; - cronjobNoti.Profile.LeaveDate = DateTime.Now; - } - await _dbContext.SaveChangesAsync(); - } - - //ให้ออก - public async Task NotifyOut() - { - var cronjobNotis = await _dbContext.Set() - //.Include(x => x.Profile) - //.ThenInclude(x => x.Prefix) - .Where(x => x.Date != null && x.Date.Value.Date == DateTime.Now.Date) - .AsQueryable() - .ToListAsync(); - await _dbContext.SaveChangesAsync(); - } - - //เกษียณอายุราชการ - //public async Task ExecuteRetirement() - //{ - // var retirePeriodOfficer = await _dbContext.Set() - // .Include(x => x.RetirementRawProfiles.Where(y => y.Remove != "REMOVE")) - // .Where(x => x.Year == DateTime.Now.Year) - // .Where(x => x.Type.Trim().ToUpper().Contains("OFFICER")) - // .FirstOrDefaultAsync(); - - // if (retirePeriodOfficer == null) - // return; - - // var body = new - // { - // data = retirePeriodOfficer.RetirementRawProfiles - // .Select(x => new - // { - // profileId = x.profileId - // }) - // .ToList() - // }; - - // //ข้าราชการ - // //var apiUrl = $"{_configuration["API"]}/org/unauthorize/retirement"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - - // var jsonBody = JsonConvert.SerializeObject(body); - // var content = new StringContent(jsonBody, Encoding.UTF8, "application/json"); - - // var _req = new HttpRequestMessage(HttpMethod.Patch, apiUrl) - // { - // Content = content - // }; - // var response = await client.SendAsync(_req); - // var responseContent = await response.Content.ReadAsStringAsync(); - // if (!response.IsSuccessStatusCode) - // { - - // } - // } - //} - - public void TestMethod() - { - return; - } - public async Task GetByIdAsync(Guid id) - { - try - { - var data = await _dbContext.Set().AsQueryable() - .Include(x => x.Approvers) - .FirstOrDefaultAsync(x => x.Id == id); - - return data; - } - catch - { - throw; - } - - } - public async Task OfficerApproveRetirementResignEmployee(Guid id) - { - var rawData = await GetByIdAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - rawData.Status = "PENDING"; - if (rawData.ApproveStep == "st1") - { - rawData.ApproveStep = "st2"; - } - else if (rawData.ApproveStep == "st3") - { - rawData.ApproveStep = "st4"; - // TODO: Send notification to 1st Approver - var _firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var _noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = _firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail/{id}", - }; - _dbContext.Set().Add(_noti1); - } - - await _dbContext.SaveChangesAsync(); - - // TODO: Send notification to 1st Commander - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "COMMANDER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail/{id}", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - - public async Task CommanderApproveRetirementResignEmployee(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - - var rawData = await GetByIdAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st2") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - //var approvers = await _dbContext.Set() - // //.AsNoTracking() - // .Include(x => x.RetirementResignEmployee) - // .Where(x => x.RetirementResignEmployee.Id == id && x.ApproveType == "COMMANDER") - // .OrderBy(x => x.Seq) - // .ToListAsync(); - - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - var maxSeq = approvers.Max(x => x.Seq); - - //var data = await _dbContext.Set() - // .AsNoTracking() - // .Include(x => x.RetirementResignEmployee) - // .Where(x => x.RetirementResignEmployee.Id == id && x.KeycloakId == userId && x.ApproveType == "COMMANDER") - // .FirstOrDefaultAsync(); - - //if(data != null) - //{ - // data.ApproveStatus = "APPROVE"; - // data.Comment = reason; - - // data.LastUpdatedAt = DateTime.Now; - // data.LastUpdateUserId = userId.ToString("D"); - // data.LastUpdateFullName = FullName ?? ""; - - // await _dbContext.SaveChangesAsync(); - //} - - approver.ApproveStatus = "APPROVE"; - approver.Comment = reason; - approver.RejectDate = date; - - //await _dbContext.SaveChangesAsync(); - - if (approver.Seq != maxSeq) - { - rawData.Status = "PENDING"; - - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - - // Send Noti - var noti = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail/{id}", - }; - _dbContext.Set().Add(noti); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "PENDING"; - // rawData.LeaveComment = reason; - // if (rawData.Group != "1.1") - // { - rawData.ApproveStep = "st3"; - // } - - - // TODO: Send notification to 1st Approver - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - - // Send Notification - var noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail/{id}", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - } - - public async Task CommanderRejectRetirementResignEmployee(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - - var rawData = await GetByIdAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st2") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "REJECT"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - - - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail/{id}", - }; - _dbContext.Set().Add(noti); - - rawData.Status = "PENDING"; - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "PENDING"; - // rawData.LeaveComment = reason; - // if (rawData.Group != "1.1") - // { - rawData.ApproveStep = "st3"; - // } - - - // TODO: Send notification to 1st Approver - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail/{id}", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - - } - - public async Task ApproveRetirementResignEmployee(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var rawData = await GetByIdAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st3") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "APPROVE"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "APPROVE"; - // rawData.LeaveDirectorComment = reason; - if (rawData.Group != "1.1") - { - rawData.ApproveStep = "st5"; - } - else - { - rawData.ApproveStep = "st4"; - } - - // Send Noti - var noti = new Notification - { - Body = $"การขอลาออกของคุณได้รับการอนุมัติ", - ReceiverUserId = Guid.Parse(rawData.profileId), - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti); - await _dbContext.SaveChangesAsync(); - } - - } - - public async Task RejectRetirementResignEmployee(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var rawData = await GetByIdAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st3") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "REJECT"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "REJECT"; - // rawData.LeaveDirectorComment = reason; - if (rawData.Group != "1.1") - { - rawData.ApproveStep = "st5"; - } - else - { - rawData.ApproveStep = "st4"; - } - - // Send Noti - var noti = new Notification - { - Body = $"การขอลาออกของคุณไม่ได้รับการอนุมัติ \r\nเนื่องจาก{reason}", - ReceiverUserId = Guid.Parse(rawData.profileId), - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti); - await _dbContext.SaveChangesAsync(); - } - } - - - - public async Task GetByIdCancelAsync(Guid id) - { - try - { - var data = await _dbContext.Set().AsQueryable() - .Include(x => x.Approvers) - .Include(x => x.RetirementResignEmployee) - .FirstOrDefaultAsync(x => x.Id == id); - - return data; - } - catch - { - throw; - } - - } - public async Task OfficerApproveRetirementResignEmployeeCancel(Guid id) - { - var rawData = await GetByIdCancelAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - rawData.Status = "PENDING"; - if (rawData.ApproveStep == "st1") - { - rawData.ApproveStep = "st2"; - } - else if (rawData.ApproveStep == "st3") - { - rawData.ApproveStep = "st4"; - // TODO: Send notification to 1st Approver - var _firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var _noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = _firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(_noti1); - } - - await _dbContext.SaveChangesAsync(); - - // TODO: Send notification to 1st Commander - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "COMMANDER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - - public async Task CommanderApproveRetirementResignEmployeeCancel(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - - var rawData = await GetByIdCancelAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st2") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - //var approvers = await _dbContext.Set() - // //.AsNoTracking() - // .Include(x => x.RetirementResignEmployeeCancel) - // .Where(x => x.RetirementResignEmployeeCancel.Id == id && x.ApproveType == "COMMANDER") - // .OrderBy(x => x.Seq) - // .ToListAsync(); - - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - var maxSeq = approvers.Max(x => x.Seq); - - //var data = await _dbContext.Set() - // .AsNoTracking() - // .Include(x => x.RetirementResignEmployeeCancel) - // .Where(x => x.RetirementResignEmployeeCancel.Id == id && x.KeycloakId == userId && x.ApproveType == "COMMANDER") - // .FirstOrDefaultAsync(); - - //if(data != null) - //{ - // data.ApproveStatus = "APPROVE"; - // data.Comment = reason; - - // data.LastUpdatedAt = DateTime.Now; - // data.LastUpdateUserId = userId.ToString("D"); - // data.LastUpdateFullName = FullName ?? ""; - - // await _dbContext.SaveChangesAsync(); - //} - - approver.ApproveStatus = "APPROVE"; - approver.Comment = reason; - approver.RejectDate = date; - - //await _dbContext.SaveChangesAsync(); - - if (approver.Seq != maxSeq) - { - rawData.Status = "PENDING"; - - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - - // Send Noti - var noti = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(noti); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "PENDING"; - // rawData.LeaveComment = reason; - // if (rawData.Group != "1.1") - // { - rawData.ApproveStep = "st3"; - // } - - - // TODO: Send notification to 1st Approver - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - - // Send Notification - var noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - } - - public async Task CommanderRejectRetirementResignEmployeeCancel(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - - var rawData = await GetByIdCancelAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st2") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "REJECT"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - - - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(noti); - - rawData.Status = "PENDING"; - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "PENDING"; - // rawData.LeaveComment = reason; - // if (rawData.Group != "1.1") - // { - rawData.ApproveStep = "st3"; - // } - - - // TODO: Send notification to 1st Approver - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-employee-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - - } - - public async Task ApproveRetirementResignEmployeeCancel(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var rawData = await GetByIdCancelAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st3") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "APPROVE"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "APPROVE"; - // rawData.LeaveDirectorComment = reason; - if (rawData.Group != "1.1") - { - rawData.ApproveStep = "st5"; - } - else - { - rawData.ApproveStep = "st4"; - } - - // Send Noti - var noti = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณได้รับการอนุมัติ", - ReceiverUserId = Guid.Parse(rawData.profileId), - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti); - await _dbContext.SaveChangesAsync(); - } - - } - - public async Task RejectRetirementResignEmployeeCancel(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var rawData = await GetByIdCancelAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st3") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "REJECT"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "REJECT"; - // rawData.LeaveDirectorComment = reason; - if (rawData.Group != "1.1") - { - rawData.ApproveStep = "st5"; - } - else - { - rawData.ApproveStep = "st4"; - } - - // Send Noti - var noti = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณไม่ได้รับการอนุมัติ \r\nเนื่องจาก{reason}", - ReceiverUserId = Guid.Parse(rawData.profileId), - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti); - await _dbContext.SaveChangesAsync(); - } - } - - } -} diff --git a/BMA.EHR.Application/Repositories/RetirementRepository.cs b/BMA.EHR.Application/Repositories/RetirementRepository.cs index b03a2afb..88e49145 100644 --- a/BMA.EHR.Application/Repositories/RetirementRepository.cs +++ b/BMA.EHR.Application/Repositories/RetirementRepository.cs @@ -1,14 +1,11 @@ using BMA.EHR.Application.Common.Interfaces; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Domain.Models.Notifications; using BMA.EHR.Domain.Models.Retirement; -using BMA.EHR.Domain.Shared; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using System.Net.Http.Headers; -using System.Net.Http.Json; using System.Security.Claims; using System.Text; @@ -20,18 +17,15 @@ namespace BMA.EHR.Application.Repositories private readonly IHttpContextAccessor _httpContextAccessor; private readonly NotificationRepository _repositoryNoti; private readonly IConfiguration _configuration; - private readonly string URL = string.Empty; public RetirementRepository(IApplicationDBContext dbContext, NotificationRepository repositoryNoti, IHttpContextAccessor httpContextAccessor, - UserProfileRepository userProfileRepository, IConfiguration configuration) : base(dbContext, httpContextAccessor) { _dbContext = dbContext; _httpContextAccessor = httpContextAccessor; _repositoryNoti = repositoryNoti; _configuration = configuration; - URL = _configuration["VITE_URL_MGT"]; } #region " Properties " @@ -89,836 +83,54 @@ namespace BMA.EHR.Application.Repositories await _dbContext.SaveChangesAsync(); } + //เกษียณอายุราชการ + //public async Task ExecuteRetirement() + //{ + // var retirePeriodOfficer = await _dbContext.Set() + // .Include(x => x.RetirementRawProfiles.Where(y => y.Remove != "REMOVE")) + // .Where(x => x.Year == DateTime.Now.Year) + // .Where(x => x.Type.Trim().ToUpper().Contains("OFFICER")) + // .FirstOrDefaultAsync(); + + // if (retirePeriodOfficer == null) + // return; + + // var body = new + // { + // data = retirePeriodOfficer.RetirementRawProfiles + // .Select(x => new + // { + // profileId = x.profileId + // }) + // .ToList() + // }; + + // //ข้าราชการ + // //var apiUrl = $"{_configuration["API"]}/org/unauthorize/retirement"; + // using (var client = new HttpClient()) + // { + // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + // client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + + // var jsonBody = JsonConvert.SerializeObject(body); + // var content = new StringContent(jsonBody, Encoding.UTF8, "application/json"); + + // var _req = new HttpRequestMessage(HttpMethod.Patch, apiUrl) + // { + // Content = content + // }; + // var response = await client.SendAsync(_req); + // var responseContent = await response.Content.ReadAsStringAsync(); + // if (!response.IsSuccessStatusCode) + // { + + // } + // } + //} + public void TestMethod() { return; } - public async Task GetByIdAsync(Guid id) - { - try - { - var data = await _dbContext.Set().AsQueryable() - .Include(x => x.Approvers) - .FirstOrDefaultAsync(x => x.Id == id); - - return data; - } - catch - { - throw; - } - - } - public async Task OfficerApproveRetirementResign(Guid id) - { - var rawData = await GetByIdAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - rawData.Status = "PENDING"; - if (rawData.ApproveStep == "st1") - { - rawData.ApproveStep = "st2"; - } - else if (rawData.ApproveStep == "st3") - { - rawData.ApproveStep = "st4"; - // TODO: Send notification to 1st Approver - var _firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var _noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = _firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail/{id}", - }; - _dbContext.Set().Add(_noti1); - } - - // TODO: Send notification to 1st Commander - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "COMMANDER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail/{id}", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - - public async Task CommanderApproveRetirementResign(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - - var rawData = await GetByIdAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st2") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "APPROVE"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - rawData.Status = "PENDING"; - - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - - // Send Noti - var noti = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail/{id}", - }; - _dbContext.Set().Add(noti); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "PENDING"; - rawData.ApproveStep = "st3"; - - if (rawData.Group == "1.1") - { - // TODO: Send notification to 1st Approver - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - - // Send Notification - var noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail/{id}", - }; - _dbContext.Set().Add(noti1); - } - await _dbContext.SaveChangesAsync(); - } - } - - public async Task CommanderRejectRetirementResign(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - - var rawData = await GetByIdAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st2") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "REJECT"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - - - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail/{id}", - }; - _dbContext.Set().Add(noti); - - rawData.Status = "PENDING"; - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "PENDING"; - // rawData.LeaveComment = reason; - // if (rawData.Group != "1.1") - // { - rawData.ApproveStep = "st3"; - // } - - if (rawData.Group == "1.1") - { - // TODO: Send notification to 1st Approver - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail/{id}", - }; - _dbContext.Set().Add(noti1); - } - await _dbContext.SaveChangesAsync(); - } - - } - - public async Task ApproveRetirementResign(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var rawData = await GetByIdAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st3") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "APPROVE"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "APPROVE"; - // rawData.LeaveDirectorComment = reason; - if (rawData.Group != "1.1") - { - rawData.ApproveStep = "st5"; - } - else - { - rawData.ApproveStep = "st4"; - } - - if (rawData.profileId != null) - { - // Send Noti - var noti = new Notification - { - Body = $"การขอลาออกของคุณได้รับการอนุมัติ", - ReceiverUserId = Guid.Parse(rawData.profileId), - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti); - } - await _dbContext.SaveChangesAsync(); - } - - } - - public async Task RejectRetirementResign(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var rawData = await GetByIdAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st3") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "REJECT"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti1 = new Notification - { - Body = $"การขอลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "REJECT"; - if (rawData.Group != "1.1") - { - rawData.ApproveStep = "st5"; - } - else - { - rawData.ApproveStep = "st4"; - } - - // Send Noti - var noti = new Notification - { - Body = $"การขอลาออกของคุณไม่ได้รับการอนุมัติ \r\nเนื่องจาก{reason}", - ReceiverUserId = Guid.Parse(rawData.profileId), - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti); - await _dbContext.SaveChangesAsync(); - } - } - - - public async Task GetByIdCancelAsync(Guid id) - { - try - { - var data = await _dbContext.Set().AsQueryable() - .Include(x => x.Approvers) - .FirstOrDefaultAsync(x => x.Id == id); - - return data; - } - catch - { - throw; - } - - } - public async Task OfficerApproveRetirementResignCancel(Guid id) - { - var rawData = await GetByIdCancelAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - rawData.Status = "PENDING"; - if (rawData.ApproveStep == "st1") - { - rawData.ApproveStep = "st2"; - } - else if (rawData.ApproveStep == "st3") - { - rawData.ApproveStep = "st4"; - // TODO: Send notification to 1st Approver - var _firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var _noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = _firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(_noti1); - } - - // TODO: Send notification to 1st Commander - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "COMMANDER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - - public async Task CommanderApproveRetirementResignCancel(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - - var rawData = await GetByIdCancelAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st2") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "APPROVE"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - rawData.Status = "PENDING"; - - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - - // Send Noti - var noti = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(noti); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "PENDING"; - rawData.ApproveStep = "st3"; - - if (rawData.Group == "1.1") - { - // TODO: Send notification to 1st Approver - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - - // Send Notification - var noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(noti1); - } - await _dbContext.SaveChangesAsync(); - } - } - - public async Task CommanderRejectRetirementResignCancel(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - - var rawData = await GetByIdCancelAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st2") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "REJECT"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - - - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(noti); - - rawData.Status = "PENDING"; - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "PENDING"; - // rawData.LeaveComment = reason; - // if (rawData.Group != "1.1") - // { - rawData.ApproveStep = "st3"; - // } - - if (rawData.Group == "1.1") - { - // TODO: Send notification to 1st Approver - var firstCommander = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "APPROVER") - .OrderBy(x => x.Seq) - .FirstOrDefault(); - // Send Notification - var noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = firstCommander!.ProfileId, - Type = "", - Payload = $"{URL}/retirement/resign-detail-reject/{rawData.Id}", - }; - _dbContext.Set().Add(noti1); - } - await _dbContext.SaveChangesAsync(); - } - - } - - public async Task ApproveRetirementResignCancel(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var rawData = await GetByIdCancelAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st3") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "APPROVE"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "APPROVE"; - // rawData.LeaveDirectorComment = reason; - if (rawData.Group != "1.1") - { - rawData.ApproveStep = "st5"; - } - else - { - rawData.ApproveStep = "st4"; - } - - if (rawData.profileId != null) - { - // Send Noti - var noti = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณได้รับการอนุมัติ", - ReceiverUserId = Guid.Parse(rawData.profileId), - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti); - } - await _dbContext.SaveChangesAsync(); - } - - } - - public async Task RejectRetirementResignCancel(Guid id, string reason, DateTime? date) - { - // Get UserId from token - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var rawData = await GetByIdCancelAsync(id); - if (rawData == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // if (rawData.ApproveStep != "st3") - // { - // throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้"); - // } - - // check commander approve - var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList(); - - var approver = approvers.FirstOrDefault(x => x.KeycloakId == userId); - if (approver == null) - { - throw new Exception("คุณไม่มีสิทธิ์อนุมัติการลาออกในขั้นตอนนี้"); - } - - // check prev approver มี action แล้วหรือไม่? - var prevApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq - 1); - - if (prevApprover != null) - { - if (prevApprover.ApproveStatus == "PENDING") - { - throw new Exception("ไม่สามารถทำการอนุมัติได้ เนื่องจากยังอยู่ระหว่างการพิจารณาโดยผู้บังคับบัญชารายก่อนหน้า"); - } - } - - - var maxSeq = approvers.Max(x => x.Seq); - - approver.ApproveStatus = "REJECT"; - approver.Comment = reason; - approver.RejectDate = date; - - if (approver.Seq != maxSeq) - { - var nextApprover = approvers.FirstOrDefault(x => x.Seq == approver.Seq + 1); - // Send Noti - var noti1 = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณ {rawData.firstName} {rawData.lastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = nextApprover!.ProfileId, - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti1); - await _dbContext.SaveChangesAsync(); - } - else - { - rawData.Status = "REJECT"; - if (rawData.Group != "1.1") - { - rawData.ApproveStep = "st5"; - } - else - { - rawData.ApproveStep = "st4"; - } - - // Send Noti - var noti = new Notification - { - Body = $"การขอยกเลิกลาออกของคุณไม่ได้รับการอนุมัติ \r\nเนื่องจาก{reason}", - ReceiverUserId = Guid.Parse(rawData.profileId), - Type = "", - Payload = "", - }; - _dbContext.Set().Add(noti); - await _dbContext.SaveChangesAsync(); - } - } - } } diff --git a/BMA.EHR.Application/Repositories/UserProfileRepository.cs b/BMA.EHR.Application/Repositories/UserProfileRepository.cs index aa89d9b9..30e4a792 100644 --- a/BMA.EHR.Application/Repositories/UserProfileRepository.cs +++ b/BMA.EHR.Application/Repositories/UserProfileRepository.cs @@ -1,6 +1,5 @@ using BMA.EHR.Application.Common.Interfaces; using BMA.EHR.Application.Responses.Insignias; -using BMA.EHR.Application.Responses.Leaves; using BMA.EHR.Application.Responses.Organizations; using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Models.HR; @@ -10,6 +9,8 @@ using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; +using System.Reflection.Emit; +using System.Security.Cryptography; namespace BMA.EHR.Application.Repositories { @@ -66,7 +67,7 @@ namespace BMA.EHR.Application.Repositories { try { - var apiPath = $"{_configuration["API"]}/org/unauthorize/root/officer/{rootId}"; + var apiPath = $"{_configuration["API"]}/org/dotnet/root/officer/{rootId}"; var apiKey = _configuration["API_KEY"]; @@ -128,11 +129,11 @@ namespace BMA.EHR.Application.Repositories } } - public async Task> GetEmployeeProfileByPositionAsync(Guid rootId, string[] empPosId, string? accessToken) + public async Task> GetEmployeeProfileByPositionAsync(Guid rootId, dynamic empPosId, string? accessToken) { try { - var apiPath = $"{_configuration["API"]}/org/unauthorize/find/employee/position"; + var apiPath = $"{_configuration["API"]}/org/dotnet/find/employee/position"; var apiKey = _configuration["API_KEY"]; var body = new @@ -141,12 +142,7 @@ namespace BMA.EHR.Application.Repositories empPosId }; - //var bodyJson = JsonConvert.SerializeObject(bodyRaw); - - // สร้าง HTTP content - //var body = new StringContent(bodyJson, Encoding.UTF8, "application/json"); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken ?? "", body, apiKey); + var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); if (apiResult != null) { @@ -157,7 +153,7 @@ namespace BMA.EHR.Application.Repositories return null; } - catch (Exception ex) + catch { throw; } @@ -186,36 +182,11 @@ namespace BMA.EHR.Application.Repositories } } - - - public async Task GetProfileByKeycloakIdNewAsync(Guid keycloakId, string? accessToken,CancellationToken cancellationToken = default) + public async Task GetProfileByProfileIdAsync(Guid keycloakId, string? accessToken) { try { - var apiPath = $"{_configuration["API"]}/org/dotnet/by-keycloak/{keycloakId}"; - var apiKey = _configuration["API_KEY"]; - - var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey, cancellationToken); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - - public async Task GetProfileByKeycloakIdNew2Async(Guid keycloakId, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/by-keycloak2/{keycloakId}"; + var apiPath = $"{_configuration["API"]}/org/dotnet/profile/{keycloakId}"; var apiKey = _configuration["API_KEY"]; var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); @@ -233,161 +204,6 @@ namespace BMA.EHR.Application.Repositories throw; } } - - public async Task GetProfileByCheckInAsync(Guid keycloakId, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/check-keycloak/{keycloakId}"; - var apiKey = _configuration["API_KEY"]; - - var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - - - public async Task GetProfileLeaveByKeycloakIdAsync(Guid keycloakId, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/profile-leave/keycloak/{keycloakId}"; - var apiKey = _configuration["API_KEY"]; - - var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - - public async Task?> GetOCStaffAsync(Guid profileId, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/find-staff"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - assignId = "SYS_LEAVE_LIST", - profileId = profileId - }; - - //var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken ?? "", body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - - public async Task GetProfileLeaveReportByKeycloakIdAsync(Guid keycloakId, string? accessToken, string? report) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/profile-leave/keycloak"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - keycloakId = keycloakId, - report = report - }; - - //var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - - public async Task GetProfileByProfileIdAsync(Guid profileId, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/profile/{profileId}"; - var apiKey = _configuration["API_KEY"]; - - var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - - - public async Task GetProfileByProfileIdNoAuthAsync(Guid profileId, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/unauthorize/profile/{profileId}"; - var apiKey = _configuration["API_KEY"]; - - var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - public async Task UpdateDutyTimeAsync(Guid profileId, Guid roundId, DateTime effectiveDate, string? accessToken) { @@ -677,223 +493,6 @@ namespace BMA.EHR.Application.Repositories } } - public async Task> GetProfileByAdminRole(string? accessToken, int? node, string? nodeId, string role, string? revisionId, int? reqNode, string? reqNodeId, DateTime? startDate, DateTime? endDate) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/officer-by-admin-role"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - node = node, - nodeId = nodeId, - role = role, - revisionId = revisionId, - reqNode = reqNode, - reqNodeId = reqNodeId, - //startDate = startDate, - //endDate = endDate - }; - - var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - - public async Task> GetProfileByAdminRolev2(string? accessToken, int? node, string? nodeId, string role, string? revisionId, int? reqNode, string? reqNodeId, DateTime? startDate, DateTime? endDate) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/officer-by-admin-rolev2"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - node = node, - nodeId = nodeId, - role = role, - // revisionId = revisionId, - reqNode = reqNode, - reqNodeId = reqNodeId, - // startDate = startDate, - // endDate = endDate - date = endDate - }; - Console.WriteLine(body); - - var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return new List(); - } - catch - { - throw; - } - } - - public async Task> GetProfileByAdminRolev3(string? accessToken, int? node, string? nodeId, string role, string? revisionId, int? reqNode, string? reqNodeId, DateTime? startDate, DateTime? endDate) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/officer-by-admin-rolev3"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - node = node, - nodeId = nodeId, - role = role, - // revisionId = revisionId, - reqNode = reqNode, - reqNodeId = reqNodeId, - startDate = startDate, - endDate = endDate - }; - - var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - - public async Task> GetAllOfficerByRootDnaId(string? rootDnaId, DateTime date) - { - try - { - var apiPath = $"{_configuration["API"]}/org/unauthorize/officer-list"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - reqNode = 0, - reqNodeId = rootDnaId, - date = date - }; - //Console.WriteLine(body); - - var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, "", body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - else - return new List(); - } - else - return new List(); - } - catch - { - throw; - } - } - - public async Task> GetAllEmployeeByRootDnaId(string? rootDnaId, DateTime date) - { - try - { - var apiPath = $"{_configuration["API"]}/org/unauthorize/employee-list"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - reqNode = 0, - reqNodeId = rootDnaId, - startDate = date, - endDate = date - }; - //Console.WriteLine(body); - - var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, "", body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - else - return new List(); - } - else - return new List(); - } - catch - { - throw; - } - } - - public async Task> GetProfileByAdminRolev4(string? accessToken, int? node, string? nodeId, string role, string? revisionId, int? reqNode, string? reqNodeId, DateTime? startDate, DateTime? endDate) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/officer-by-admin-rolev4"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - node = node, - nodeId = nodeId, - role = role, - // revisionId = revisionId, - reqNode = reqNode, - reqNodeId = reqNodeId, - // startDate = startDate, - // endDate = endDate - date = endDate - }; - Console.WriteLine(body); - - var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return new List(); - } - catch - { - throw; - } - } - public async Task> GetProfileWithKeycloakAllOfficerRetireFilterAndRevision(string? accessToken, int? node, string? nodeId, bool isAll, bool? isRetirement, string? revisionId) { try @@ -927,41 +526,6 @@ namespace BMA.EHR.Application.Repositories } } - public async Task> GetProfileWithKeycloakAllOfficerRetireFilterAndRevisionAndDate(string? accessToken, int? node, string? nodeId, bool isAll, bool? isRetirement, string? revisionId, DateTime? startDate, DateTime? endDate) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/keycloak-all-officer/date"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - node = node, - nodeId = nodeId, - isAll = isAll, - isRetirement = isRetirement, - revisionId = revisionId, - startDate = startDate, - endDate = endDate, - }; - - var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - public async Task> GetProfileWithKeycloakAllEmployeeAndRevision(string? accessToken, int? node, string? nodeId, bool isAll, string? revisionId) { try @@ -1025,80 +589,7 @@ namespace BMA.EHR.Application.Repositories throw; } } - - public async Task> GetEmployeeByAdminRole(string? accessToken, int? node, string? nodeId, string role, string? revisionId, int? reqNode, string? reqNodeId, DateTime? startDate, DateTime? endDate) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/employee-by-admin-role"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - node = node, - nodeId = nodeId, - role = role, - revisionId = revisionId, - reqNode = reqNode, - reqNodeId = reqNodeId, - startDate = startDate, - endDate = endDate - }; - - var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - - public async Task> GetEmployeeByAdminRolev2(string? accessToken, int? node, string? nodeId, string role, string? revisionId, int? reqNode, string? reqNodeId, DateTime? startDate, DateTime? endDate) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/employee-by-admin-rolev2"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - node = node, - nodeId = nodeId, - role = role, - // isRetirement - reqNode = reqNode, - reqNodeId = reqNodeId, - date = endDate - }; - Console.WriteLine(body); - - var profiles = new List(); - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return new List(); - } - catch - { - throw; - } - } - - public async Task SearchProfile(string? citizenId, string? firstName, string? lastName, string accessToken, int page, int pageSize, string? role, string? nodeId, int? node,string? selectedNodeId,int? selectedNode ) + public async Task> SearchProfile(string? citizenId, string? firstName, string? lastName, string accessToken) { try { @@ -1108,31 +599,42 @@ namespace BMA.EHR.Application.Repositories { citizenId = citizenId, firstName = firstName, - lastName = lastName, - role = role, - nodeId = nodeId, - node = node, - page = page, - pageSize = pageSize, - selectedNodeId = selectedNodeId, - selectedNode = selectedNode + lastName = lastName }; - var profiles = new List(); - var total = 0; + var profiles = new List(); var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); if (apiResult != null) { - var raw = JsonConvert.DeserializeObject(apiResult); + var raw = JsonConvert.DeserializeObject(apiResult); if (raw != null && raw.Result != null) { - profiles = raw.Result.Data; - total = raw.Result.Total; + profiles.AddRange(raw.Result); } } - return new GetProfileByKeycloakIdRootAddTotalDto { Data = profiles, Total = total }; + return profiles; + + //var data = _dbContext.Set().AsQueryable() + // .Where(x => x.ProfileType == "officer"); + + + //if (citizenId != null) + // data = data.Where(x => x.CitizenId!.Contains(citizenId)); + + //if (firstName != null) + // data = data.Where(x => x.FirstName!.Contains(firstName)); + + //if (lastName != null) + // data = data.Where(x => x.LastName!.Contains(lastName)); + + //data = data.Include(x => x.Prefix) + // .Include(x => x.Position) + // .Include(x => x.PositionLevel) + // .Include(x => x.PosNo); + + //return await data.ToListAsync(); } catch { @@ -1140,7 +642,7 @@ namespace BMA.EHR.Application.Repositories } } - public async Task SearchProfileEmployee(string? citizenId, string? firstName, string? lastName, string accessToken, int page, int pageSize, string? role, string? nodeId, int? node) + public async Task> SearchProfileEmployee(string? citizenId, string? firstName, string? lastName, string accessToken) { try { @@ -1150,29 +652,42 @@ namespace BMA.EHR.Application.Repositories { citizenId = citizenId, firstName = firstName, - lastName = lastName, - role = role, - nodeId = nodeId, - node = node, - page = page, - pageSize = pageSize, + lastName = lastName }; - var profiles = new List(); - var total = 0; + var profiles = new List(); var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); if (apiResult != null) { - var raw = JsonConvert.DeserializeObject(apiResult); + var raw = JsonConvert.DeserializeObject(apiResult); if (raw != null && raw.Result != null) { - profiles.AddRange(raw.Result.Data); - total = raw.Result.Total; + profiles.AddRange(raw.Result); } } - return new GetProfileByKeycloakIdRootAddTotalDto { Data = profiles, Total = total }; + return profiles; + + + //var data = _dbContext.Set().AsQueryable() + // .Where(x => x.ProfileType == "employee"); + + + //if (citizenId != null) + // data = data.Where(x => x.CitizenId!.Contains(citizenId)); + + //if (firstName != null) + // data = data.Where(x => x.FirstName!.Contains(firstName)); + + //if (lastName != null) + // data = data.Where(x => x.LastName!.Contains(lastName)); + + //data = data.Include(x => x.Prefix); + ////.Include(x => x.PosNoEmployee); + + + //return await data.ToListAsync(); } catch { @@ -1241,30 +756,7 @@ namespace BMA.EHR.Application.Repositories } } - public async Task GetUserOCAll(Guid keycloakId, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/user-oc-all/{keycloakId}"; - var apiKey = _configuration["API_KEY"]; - - var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - return raw?.Result; - } - - return null; - } - catch - { - throw; - } - } - - - public async Task GetUserOC(Guid keycloakId, string? accessToken) + public GetUserOCIdDto? GetUserOC(Guid keycloakId, string? accessToken) { try { @@ -1275,11 +767,15 @@ namespace BMA.EHR.Application.Repositories var apiResult = GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); if (apiResult.Result != null) { - var raw = JsonConvert.DeserializeObject(apiResult.Result); + var raw = JsonConvert.DeserializeObject(apiResult.Result); - if (raw != null) - return raw.Result; + return raw; + + //if (raw == null || raw.RootId == null) + // return Guid.Empty; + //return raw.RootId; } + return null; } catch @@ -1318,43 +814,11 @@ namespace BMA.EHR.Application.Repositories } } - public GetOrganizationResponseDTO? GetOcByNodeId(Guid ocId, int level, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/find/all"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - nodeId = ocId, - node = level - - }; - - var apiResult = PostExternalAPIAsync(apiPath, accessToken ?? "", body, apiKey).Result; - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null && raw.Result != null) - { - return raw.Result; - } - } - - return null; - } - catch - { - throw; - } - } - - public GetOrganizationResponseDTO? GetOc(Guid ocId, int level, string? accessToken) { try { - var apiPath = $"{_configuration["API"]}/org/find/allv2"; + var apiPath = $"{_configuration["API"]}/org/find/all"; var apiKey = _configuration["API_KEY"]; var body = new { @@ -1500,7 +964,7 @@ namespace BMA.EHR.Application.Repositories { try { - var apiPath = $"{_configuration["API"]}/org/unauthorize/active/root/all"; + var apiPath = $"{_configuration["API"]}/org/active/root/all"; var apiKey = _configuration["API_KEY"]; var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); @@ -1538,48 +1002,6 @@ namespace BMA.EHR.Application.Repositories } - public async Task PostInsigniaMessageToSocket(string message, string userId, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/through-socket/notify"; - var apiKey = _configuration["API_KEY"]; - - var body = new - { - message = message, - userId = userId - }; - - var apiResult = await PostExternalAPIBooleanAsync(apiPath, accessToken ?? "", body, apiKey); - - } - catch - { - throw; - } - - } - - public async Task PostProfileEmpInsigniaAsync(PostProfileEmpInsigniaDto body, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/profile-employee/insignia"; - var apiKey = _configuration["API_KEY"]; - - var profiles = new List(); - - var apiResult = await PostExternalAPIBooleanAsync(apiPath, accessToken ?? "", body, apiKey); - - } - catch - { - throw; - } - - } - public async Task GetIsOfficerRootAsync(string? accessToken, string sys) { try @@ -1602,82 +1024,6 @@ namespace BMA.EHR.Application.Repositories } - public async Task> GetInsigniaRequestsProfileAsync(string[] profileIds, string type, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/dotnet/find/insignia-requests-profile/{type}"; - var apiKey = _configuration["API_KEY"]; - - var body = new - { - profileIds - }; - - var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); - - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - - public GetOrgProfileByProfileIdDto GetOrgProfileByProfileId(Guid id, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/profile/org-user/{id}"; - var apiKey = _configuration["API_KEY"]; - - var apiResult = GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); - if (apiResult.Result != null) - { - var raw = JsonConvert.DeserializeObject(apiResult.Result); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - throw; - } - } - public async Task> GetProfileSalaryById(Guid profileId, string? accessToken) - { - try - { - var apiPath = $"{_configuration["API"]}/org/profile/insignia/position"; - var apiKey = _configuration["API_KEY"]; - var body = new - { - profileId = profileId.ToString(), - }; - var apiResult = await PostExternalAPIAsync(apiPath, accessToken ?? "", body, apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - return null; - } - catch - { - throw; - } - } - #endregion } } diff --git a/BMA.EHR.Application/Requests/InsigniaBorrowRequest.cs b/BMA.EHR.Application/Requests/InsigniaBorrowRequest.cs index 0dbb49dc..3d8481a6 100644 --- a/BMA.EHR.Application/Requests/InsigniaBorrowRequest.cs +++ b/BMA.EHR.Application/Requests/InsigniaBorrowRequest.cs @@ -9,18 +9,4 @@ namespace BMA.EHR.Application.Requests public Guid? BorrowOrganizationId { get; set; } public Guid InsigniaNoteProfileId { get; set; } } - - public class InsigniaReclaimRequest - { - public DateTime ReclaimDate { get; set; } - public Guid InsigniaNoteProfileId { get; set; } - - public string? ReclaimNote { get; set; } - } - - public class UpdateInsigniaReclaimRequest - { - public DateTime ReclaimDate { get; set; } - public string? ReclaimNote { get; set; } - } } diff --git a/BMA.EHR.Application/Requests/InsigniaRequestItem.cs b/BMA.EHR.Application/Requests/InsigniaRequestItem.cs index 330626d9..c500bcc0 100644 --- a/BMA.EHR.Application/Requests/InsigniaRequestItem.cs +++ b/BMA.EHR.Application/Requests/InsigniaRequestItem.cs @@ -23,7 +23,6 @@ public bool? MarkDiscipline { get; set; } public bool? MarkLeave { get; set; } public bool? MarkRate { get; set; } - public bool? MarkInsignia { get; set; } public List? Docs { get; set; } public List MatchingConditions { get; set; } = new List(); diff --git a/BMA.EHR.Application/Requests/InsigniaResultSet.cs b/BMA.EHR.Application/Requests/InsigniaResultSet.cs index f396fcf9..35dbb596 100644 --- a/BMA.EHR.Application/Requests/InsigniaResultSet.cs +++ b/BMA.EHR.Application/Requests/InsigniaResultSet.cs @@ -68,14 +68,6 @@ namespace BMA.EHR.Application.Requests public string? Child4 { get; set; } public List MatchingConditions { get; set; } = new List(); - - public bool? MarkDiscipline { get; set; } = false; - - public bool? MarkLeave { get; set; } = false; - - public bool? MarkRate { get; set; } = false; - - public bool? MarkInsignia { get; set; } = false; } public class MatchingCondition diff --git a/BMA.EHR.Application/Responses/CommandPayload.cs b/BMA.EHR.Application/Responses/CommandPayload.cs index 86027257..2aa96f4d 100644 --- a/BMA.EHR.Application/Responses/CommandPayload.cs +++ b/BMA.EHR.Application/Responses/CommandPayload.cs @@ -13,6 +13,5 @@ public bool? isReport { get; set; } - public bool? isTemplate { get; set; } } } diff --git a/BMA.EHR.Application/Responses/Insignias/PostProfileEmpInsigniaDto.cs b/BMA.EHR.Application/Responses/Insignias/PostProfileEmpInsigniaDto.cs deleted file mode 100644 index d01fbd8c..00000000 --- a/BMA.EHR.Application/Responses/Insignias/PostProfileEmpInsigniaDto.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace BMA.EHR.Application.Responses.Insignias -{ - public class PostProfileEmpInsigniaDto - { - public Guid profileEmployeeId { get; set; } - - public int year { get; set; } = 0; - - public string no { get; set; } = string.Empty; - - public string volume { get; set; } = string.Empty; - - public string section { get; set; } = string.Empty; - - public string page { get; set; } = string.Empty; - - public DateTime receiveDate { get; set; } = DateTime.MinValue; - - public Guid insigniaId { get; set; } - - public DateTime dateAnnounce { get; set; } = DateTime.MinValue; - - public string issue { get; set; } = string.Empty; - - public string volumeNo { get; set; } = string.Empty; - - public DateTime? refCommandDate { get; set; } - - public string refCommandNo { get; set; } = string.Empty; - - public string note { get; set; } = string.Empty; - } -} diff --git a/BMA.EHR.Application/Responses/Leaves/GetPermissionWithActingDto.cs b/BMA.EHR.Application/Responses/Leaves/GetPermissionWithActingDto.cs deleted file mode 100644 index 083c4b20..00000000 --- a/BMA.EHR.Application/Responses/Leaves/GetPermissionWithActingDto.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using BMA.EHR.Domain.Shared; -using Newtonsoft.Json; - -namespace BMA.EHR.Application.Responses.Leaves -{ - public class GetPermissionWithActingDto - { - public string privilege {get; set;} = string.Empty; - public bool isAct {get; set;} = false; - public List posMasterActs {get; set;} = new(); - } - - public class ActingPermission - { - public string posNo {get; set;} = string.Empty; - //public string? privilege {get; set;} = "PARENT"; - [JsonConverter(typeof(PrivilegeConverter))] - public string privilege {get; set;} = "CHILD"; - - public Guid? rootDnaId {get; set;} - public Guid? child1DnaId {get; set;} - public Guid? child2DnaId {get; set;} - public Guid? child3DnaId {get; set;} - public Guid? child4DnaId {get; set;} - } - - public class GetPermissionWithActingResultDto - { - public int status {get; set;} = 0; - public string message {get; set;} = string.Empty; - public GetPermissionWithActingDto result {get; set;} = new(); - } -} \ No newline at end of file diff --git a/BMA.EHR.Application/Responses/Leaves/GetProfileLeaveByKeycloakDto.cs b/BMA.EHR.Application/Responses/Leaves/GetProfileLeaveByKeycloakDto.cs deleted file mode 100644 index 9d13d834..00000000 --- a/BMA.EHR.Application/Responses/Leaves/GetProfileLeaveByKeycloakDto.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace BMA.EHR.Application.Responses.Leaves -{ - public class GetProfileLeaveByKeycloakDto - { - public string ProfileType { get; set; } - public string Prefix { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string CitizenId { get; set; } - public DateTime BirthDate { get; set; } - public DateTime RetireDate { get; set; } - public string GovAge { get; set; } = string.Empty; - public string Age { get; set; } = string.Empty; - public DateTime DateAppoint { get; set; } - public DateTime DateCurrent { get; set; } - public int? Amount { get; set; } = 0; - public string? TelephoneNumber { get; set; } = string.Empty; - public string Position { get; set; } = string.Empty; - public string PosLevel { get; set; } = string.Empty; - public string PosType { get; set; } = string.Empty; - public string? PositionLeaveName { get; set; } - public string? PosExecutiveName { get; set; } - public string CurrentAddress { get; set; } = string.Empty; - public string Oc { get; set; } = string.Empty; - public bool isCommission { get; set; } = false; - public string Root { get; set; } = string.Empty; - public string? Child1 { get; set; } - public string? Child2 { get; set; } - public string? Child3 { get; set; } - public string? Child4 { get; set; } - public List Positions { get; set; } = new(); - public List Educations { get; set; } = new(); - } - - public class ProfileLeavePosition - { - public string? PositionName { get; set; } = string.Empty; - public DateTime DateStart { get; set; } - public DateTime DateEnd { get; set; } - public string? PositionType { get; set; } = string.Empty; - public string? PositionLevel { get; set; } = string.Empty; - public string? OrgRoot { get; set; } = string.Empty; - public string? OrgChild1 { get; set; } = string.Empty; - public string? OrgChild2 { get; set; } = string.Empty; - public string? OrgChild3 { get; set; } = string.Empty; - public string? OrgChild4 { get; set; } = string.Empty; - } - - public class ProfileLeaveEducation - { - public string EducationLevel { get; set; } = string.Empty; - public string Institute { get; set; } = string.Empty; - public string? Country { get; set; } = string.Empty; - public DateTime? FinishDate { get; set; } - } -} diff --git a/BMA.EHR.Application/Responses/Leaves/GetProfileLeaveByKeycloakResultDto.cs b/BMA.EHR.Application/Responses/Leaves/GetProfileLeaveByKeycloakResultDto.cs deleted file mode 100644 index 7014cc2f..00000000 --- a/BMA.EHR.Application/Responses/Leaves/GetProfileLeaveByKeycloakResultDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BMA.EHR.Application.Responses.Leaves -{ - public class GetProfileLeaveByKeycloakResultDto - { - public string Message { get; set; } = string.Empty; - - public int Status { get; set; } = -1; - - public GetProfileLeaveByKeycloakDto? Result { get; set; } - } -} diff --git a/BMA.EHR.Application/Responses/Leaves/GetSumApproveLeaveByTypeDto.cs b/BMA.EHR.Application/Responses/Leaves/GetSumApproveLeaveByTypeDto.cs index 2bc0079c..5d73e0aa 100644 --- a/BMA.EHR.Application/Responses/Leaves/GetSumApproveLeaveByTypeDto.cs +++ b/BMA.EHR.Application/Responses/Leaves/GetSumApproveLeaveByTypeDto.cs @@ -8,8 +8,6 @@ public string LeaveTypeCode { get; set; } = string.Empty; - public double SumLeaveDay { get; set; } = 0.0; - - public int CountLeaveDay { get; set; } = 0; + public double SumLeaveDay { get; set; } } } diff --git a/BMA.EHR.Application/Responses/Organizations/GetOrganizationResponseDTO.cs b/BMA.EHR.Application/Responses/Organizations/GetOrganizationResponseDTO.cs index 13962193..07a5aec0 100644 --- a/BMA.EHR.Application/Responses/Organizations/GetOrganizationResponseDTO.cs +++ b/BMA.EHR.Application/Responses/Organizations/GetOrganizationResponseDTO.cs @@ -37,11 +37,5 @@ namespace BMA.EHR.Application.Responses.Organizations public string? Child4 { get; set; } public string? Child4ShortName { get; set; } - - public Guid? RootDnaId { get; set; } - public Guid? Child1DnaId { get; set; } - public Guid? Child2DnaId { get; set; } - public Guid? Child3DnaId { get; set; } - public Guid? Child4DnaId { get; set; } } } diff --git a/BMA.EHR.Application/Responses/Profiles/GetListProfileByKeycloakIdRootResultDto.cs b/BMA.EHR.Application/Responses/Profiles/GetListProfileByKeycloakIdRootResultDto.cs index ce2781cb..4dd09565 100644 --- a/BMA.EHR.Application/Responses/Profiles/GetListProfileByKeycloakIdRootResultDto.cs +++ b/BMA.EHR.Application/Responses/Profiles/GetListProfileByKeycloakIdRootResultDto.cs @@ -8,12 +8,4 @@ public List Result { get; set; } = new(); } - public class GetListProfileByKeycloakIdRootResultAddTotalDto - { - public string Message { get; set; } = string.Empty; - - public int Status { get; set; } = -1; - - public GetProfileByKeycloakIdRootAddTotalDto Result { get; set; } = new(); - } } diff --git a/BMA.EHR.Application/Responses/Profiles/GetMarkStatusDto.cs b/BMA.EHR.Application/Responses/Profiles/GetMarkStatusDto.cs deleted file mode 100644 index 1828762b..00000000 --- a/BMA.EHR.Application/Responses/Profiles/GetMarkStatusDto.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace BMA.EHR.Application.Responses.Profiles -{ - public class GetMarkStatusDto - { - public Guid Id { get; set; } - public bool? MarkDiscipline { get; set; } = false; - public bool? MarkLeave { get; set; } = false; - public bool? MarkRate { get; set; } = false; - public bool? MarkInsignia { get; set; } = false; - - public string? APR1 { get; set; } - public string? APR2 { get; set; } - public string? APR3 { get; set; } - public string? APR4 { get; set; } - public string? APR5 { get; set; } - - public string? OCT1 { get; set; } - public string? OCT2 { get; set; } - public string? OCT3 { get; set; } - public string? OCT4 { get; set; } - public string? OCT5 { get; set; } - } -} diff --git a/BMA.EHR.Application/Responses/Profiles/GetMarkStatusResultDto.cs b/BMA.EHR.Application/Responses/Profiles/GetMarkStatusResultDto.cs deleted file mode 100644 index 6114f325..00000000 --- a/BMA.EHR.Application/Responses/Profiles/GetMarkStatusResultDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace BMA.EHR.Application.Responses.Profiles -{ - public class GetMarkStatusResultDto - { - public string Message { get; set; } = string.Empty; - - public int Status { get; set; } = -1; - - public List Result { get; set; } = new(); - - } -} diff --git a/BMA.EHR.Application/Responses/Profiles/GetOcStaff.cs b/BMA.EHR.Application/Responses/Profiles/GetOcStaff.cs deleted file mode 100644 index fa3ce936..00000000 --- a/BMA.EHR.Application/Responses/Profiles/GetOcStaff.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace BMA.EHR.Application.Responses.Profiles -{ - public class GetOcStaff - { - public Guid ProfileId { get; set; } - public Guid Keycloak { get; set; } - public string FullName { get; set; } = null!; - public Guid? RootId { get; set; } - public Guid? OrgChild1Id { get; set; } - public Guid? OrgChild2Id { get; set; } - public Guid? OrgChild3Id { get; set; } - public Guid? OrgChild4Id { get; set; } - public Guid? RootDnaId { get; set; } - public Guid? Child1DnaId { get; set; } - public Guid? Child2DnaId { get; set; } - public Guid? Child3DnaId { get; set; } - public Guid? Child4DnaId { get; set; } - - } - - public class GetOcStaffResultDto - { - public string Message { get; set; } = string.Empty; - - public int Status { get; set; } = -1; - - public List Result { get; set; } = new(); - - } -} \ No newline at end of file diff --git a/BMA.EHR.Application/Responses/Profiles/GetOrgProfileByProfileIdDto.cs b/BMA.EHR.Application/Responses/Profiles/GetOrgProfileByProfileIdDto.cs deleted file mode 100644 index da2ccf1a..00000000 --- a/BMA.EHR.Application/Responses/Profiles/GetOrgProfileByProfileIdDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BMA.EHR.Application.Responses.Profiles -{ - public class GetOrgProfileByProfileIdDto - { - public string? Root { get; set; } - public string? Child1 { get; set; } - public string? Child2 { get; set; } - public string? Child3 { get; set; } - public string? Child4 { get; set; } - } -} diff --git a/BMA.EHR.Application/Responses/Profiles/GetOrgProfileByProfileIdResultDto.cs b/BMA.EHR.Application/Responses/Profiles/GetOrgProfileByProfileIdResultDto.cs deleted file mode 100644 index ce08c298..00000000 --- a/BMA.EHR.Application/Responses/Profiles/GetOrgProfileByProfileIdResultDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BMA.EHR.Application.Responses.Profiles -{ - public class GetOrgProfileByProfileIdResultDto - { - public string Message { get; set; } = string.Empty; - - public int Status { get; set; } = -1; - - public GetOrgProfileByProfileIdDto? Result { get; set; } - } -} diff --git a/BMA.EHR.Application/Responses/Profiles/GetProfileByKeycloakIdDto.cs b/BMA.EHR.Application/Responses/Profiles/GetProfileByKeycloakIdDto.cs index 8e319904..b9ac4725 100644 --- a/BMA.EHR.Application/Responses/Profiles/GetProfileByKeycloakIdDto.cs +++ b/BMA.EHR.Application/Responses/Profiles/GetProfileByKeycloakIdDto.cs @@ -44,8 +44,6 @@ namespace BMA.EHR.Application.Responses.Profiles public string? ProfileType { get; set; } public bool? IsLeave { get; set; } - public bool? IsProbation { get; set; } - public string? Root { get; set; } public string? Child1 { get; set; } public string? Child2 { get; set; } @@ -82,10 +80,6 @@ namespace BMA.EHR.Application.Responses.Profiles public string? CurrentZipCode { get; set; } public string? PositionLeaveName { get; set; } - - public string? PosExecutiveName { get; set; } - - public string? CommanderPositionName { get; set; } = string.Empty; } diff --git a/BMA.EHR.Application/Responses/Profiles/GetProfileByKeycloakIdRootDto.cs b/BMA.EHR.Application/Responses/Profiles/GetProfileByKeycloakIdRootDto.cs index 2eff51dd..a1d9c7ce 100644 --- a/BMA.EHR.Application/Responses/Profiles/GetProfileByKeycloakIdRootDto.cs +++ b/BMA.EHR.Application/Responses/Profiles/GetProfileByKeycloakIdRootDto.cs @@ -16,27 +16,5 @@ namespace BMA.EHR.Application.Responses.Profiles public string? PositionLevel { get; set; } public string? PositionType { get; set; } public string? Oc { get; set; } - public string? OrgRootId { get; set; } - public string? OrgChild1Id { get; set; } - public string? OrgChild2Id { get; set; } - public string? OrgChild3Id { get; set; } - public string? OrgChild4Id { get; set; } - - public DateTime? DateStart { get; set; } - - public DateTime? DateAppoint { get; set; } - - public string? RootDnaId { get; set; } - public string? Child1DnaId { get; set; } - public string? Child2DnaId { get; set; } - public string? Child3DnaId { get; set; } - public string? Child4DnaId { get; set; } - } - - public class GetProfileByKeycloakIdRootAddTotalDto - { - public List Data { get; set; } = new(); - - public int Total { get; set; } } } diff --git a/BMA.EHR.Application/Responses/Profiles/GetProfileByRootIdDto.cs b/BMA.EHR.Application/Responses/Profiles/GetProfileByRootIdDto.cs index d095f65f..fa649550 100644 --- a/BMA.EHR.Application/Responses/Profiles/GetProfileByRootIdDto.cs +++ b/BMA.EHR.Application/Responses/Profiles/GetProfileByRootIdDto.cs @@ -63,15 +63,5 @@ namespace BMA.EHR.Application.Responses.Profiles public Guid? Child4Id { get; set; } public Guid? Child4DnaId { get; set; } public string? Child4 { get; set; } - - public string? ProfileType { get; set; } - - public bool? MarkDiscipline { get; set; } = false; - - public bool? MarkLeave { get; set; } = false; - - public bool? MarkRate { get; set; } = false; - - public bool? MarkInsignia { get; set; } = false; } } diff --git a/BMA.EHR.Application/Responses/Profiles/GetProfileSalaryDto.cs b/BMA.EHR.Application/Responses/Profiles/GetProfileSalaryDto.cs deleted file mode 100644 index db0cf18d..00000000 --- a/BMA.EHR.Application/Responses/Profiles/GetProfileSalaryDto.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace BMA.EHR.Application.Responses.Profiles -{ - public class GetProfileSalaryDto - { - public DateTime DateAffect { get; set; } - public string Position { get; set; } = string.Empty; - public string Root { get; set; } = string.Empty; - public string Child1 { get; set; } = string.Empty; - public string Child2 { get; set; } = string.Empty; - public string Child3 { get; set; } = string.Empty; - public string Child4 { get; set; } = string.Empty; - public int Age { get; set; } = 0; - public int Amount { get; set; } = 0; - public string Remark { get; set; } = string.Empty; - } -} diff --git a/BMA.EHR.Application/Responses/Profiles/GetProfileSalaryResultDto.cs b/BMA.EHR.Application/Responses/Profiles/GetProfileSalaryResultDto.cs deleted file mode 100644 index 5ad8a9e3..00000000 --- a/BMA.EHR.Application/Responses/Profiles/GetProfileSalaryResultDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BMA.EHR.Application.Responses.Profiles -{ - public class GetProfileSalaryResultDto - { - public string Message { get; set; } = string.Empty; - - public int Status { get; set; } = -1; - - public List Result { get; set; } = new(); - } -} diff --git a/BMA.EHR.Application/Responses/Profiles/GetUserOCAllDto.cs b/BMA.EHR.Application/Responses/Profiles/GetUserOCAllDto.cs deleted file mode 100644 index a638a429..00000000 --- a/BMA.EHR.Application/Responses/Profiles/GetUserOCAllDto.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace BMA.EHR.Application.Responses.Profiles -{ - public class GetUserOCAllDto - { - public Guid ProfileId { get; set; } - public string? Prefix { get; set; } - public string? Rank { get; set; } - public string? Avatar { get; set; } - public string? AvatarName { get; set; } - public string? FirstName { get; set; } - public string? LastName { get; set; } - public string? CitizenId { get; set; } - public DateTime? BirthDate { get; set; } - public string? Position { get; set; } - - public int? PosMaster { get; set; } - public int? PosMasterNo { get; set; } - public string? PosLevelName { get; set; } - public string? PosLevelRank { get; set; } - public Guid? PosLevelId { get; set; } - public string? PosTypeName { get; set; } - public string? PosTypeRank { get; set; } - public Guid? PosTypeId { get; set; } - - public string? PosExecutiveName { get; set; } - public int? PosExecutivePriority { get; set; } - public Guid? PosExecutiveId { get; set; } - - public string RootId { get; set; } - public string? RootDnaId { get; set; } - public string? Root { get; set; } - public string? RootShortName { get; set; } - - public string? Child1Id { get; set; } - public string? Child1DnaId { get; set; } - public string? Child1 { get; set; } - public string? Child1ShortName { get; set; } - - public string? Child2Id { get; set; } - public string? Child2DnaId { get; set; } - public string? Child2 { get; set; } - public string? Child2ShortName { get; set; } - - public string? Child3Id { get; set; } - public string? Child3DnaId { get; set; } - public string? Child3 { get; set; } - public string? Child3ShortName { get; set; } - - public string? Child4Id { get; set; } - public string? Child4DnaId { get; set; } - public string? Child4 { get; set; } - public string? Child4ShortName { get; set; } - - public int? Node { get; set; } - public string? NodeId { get; set; } - } -} diff --git a/BMA.EHR.Application/Responses/Profiles/GetUserOCAllResultDto.cs b/BMA.EHR.Application/Responses/Profiles/GetUserOCAllResultDto.cs deleted file mode 100644 index e7370ef5..00000000 --- a/BMA.EHR.Application/Responses/Profiles/GetUserOCAllResultDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BMA.EHR.Application.Responses.Profiles -{ - public class GetUserOCAllResultDto - { - public string Message { get; set; } = string.Empty; - - public int Status { get; set; } = -1; - - public GetUserOCAllDto? Result { get; set; } - } -} diff --git a/BMA.EHR.Application/Responses/Profiles/GetUserOCIdDto.cs b/BMA.EHR.Application/Responses/Profiles/GetUserOCIdDto.cs index 874d36cf..db187a17 100644 --- a/BMA.EHR.Application/Responses/Profiles/GetUserOCIdDto.cs +++ b/BMA.EHR.Application/Responses/Profiles/GetUserOCIdDto.cs @@ -4,27 +4,26 @@ { public Guid ProfileId { get; set; } - public string? Prefix { get; set; } = string.Empty; + public string Prefix { get; set; } = string.Empty; - public string? Rank { get; set; } = string.Empty; + public string Rank { get; set; } = string.Empty; - public string? Avatar { get; set; } = string.Empty; + public string Avatar { get; set; } = string.Empty; - public string? FirstName { get; set; } = string.Empty; + public string FirstName { get; set; } = string.Empty; - public string? LastName { get; set; } = string.Empty; + public string LastName { get; set; } = string.Empty; - public string? CitizenId { get; set; } = string.Empty; + public string CitizenId { get; set; } = string.Empty; - public DateTime? BirthDate { get; set; } = DateTime.MinValue; + public DateTime BirthDate { get; set; } = DateTime.MinValue; - public string? Position { get; set; } = string.Empty; + public string Position { get; set; } = string.Empty; public Guid RootId { get; set; } - public Guid? RootDnaId { get; set; } - public string? Root { get; set; } = string.Empty; + public string Root { get; set; } = string.Empty; - public string? RootShortName { get; set; } = string.Empty; + public string RootShortName { get; set; } = string.Empty; } } diff --git a/BMA.EHR.CheckInConsumer/.dockerignore b/BMA.EHR.CheckInConsumer/.dockerignore deleted file mode 100644 index 741ce7d4..00000000 --- a/BMA.EHR.CheckInConsumer/.dockerignore +++ /dev/null @@ -1,24 +0,0 @@ -# Build artifacts -bin/ -obj/ - -# IDE / tooling -Properties/ -.vs/ -.vscode/ -.idea/ - -# Source control -.git/ -.gitignore - -# Documentation -*.md - -# Docker -Dockerfile -.dockerignore - -# OS files -.DS_Store -Thumbs.db diff --git a/BMA.EHR.CheckInConsumer/BMA.EHR.CheckInConsumer.csproj b/BMA.EHR.CheckInConsumer/BMA.EHR.CheckInConsumer.csproj index ef4df6df..c59ded2b 100644 --- a/BMA.EHR.CheckInConsumer/BMA.EHR.CheckInConsumer.csproj +++ b/BMA.EHR.CheckInConsumer/BMA.EHR.CheckInConsumer.csproj @@ -1,28 +1,25 @@  - - Exe - net8.0 - enable - enable - Linux - false - $(NoWarn);$(WarningsNotAsErrors) + + Exe + net8.0 + enable + enable + Linux + - + + + + + + + - - - - - - - - - - - PreserveNewest - - + + + PreserveNewest + + diff --git a/BMA.EHR.CheckInConsumer/CHANGELOG-checkin-speedup.md b/BMA.EHR.CheckInConsumer/CHANGELOG-checkin-speedup.md deleted file mode 100644 index 7b20dd1b..00000000 --- a/BMA.EHR.CheckInConsumer/CHANGELOG-checkin-speedup.md +++ /dev/null @@ -1,83 +0,0 @@ -# สรุปการปรับปรุงระบบลงเวลา (CheckInConsumer) - -วันที่แก้ไข: 23 มิถุนายน 2026 - ---- - -## ปัญหาเดิม - -ตอนที่พนักงานลงเวลาพร้อมกันจำนวนมาก (ประมาณ 2,000 รายการ) ระบบประมวลผลทีละรายการ ทำให้ต้องรอคิวนานถึง **22 นาที** กว่าจะประมวลผลเสร็จทั้งหมด - -เปรียบเทียบเหมือน **โต๊ะบัญชี 1 คน รับคิวทีละคน** ทั้งที่มีคนรอ 2,000 คน → คิวยาวมาก - ---- - -## วิธีที่แก้ (เข้าใจง่าย ๆ) - -### 1. เพิ่มคนช่วยประมวลผลพร้อมกัน (Concurrency) -- **ก่อน:** ประมวลผลทีละรายการ (เหมือนมีโต๊ะบัญชี 1 โต๊ะ) -- **หลัง:** ประมวลผลพร้อมกันได้สูงสุด **5 รายการ** (เหมือนเปิดโต๊ะบัญชี 5 โต๊ะ) - -> ผลที่ได้: เวลารอคิวลดลงจาก **22 นาที → ประมาณ 4–5 นาที** - -### 2. จัดคิวล่วงหน้าให้ RabbitMQ (Prefetch) -- **ก่อน:** ระบบดึงข้อมูลมาทีละชิ้น ทำให้เสียเวลารอส่งต่อ -- **หลัง:** ระบบดึงข้อมูลมาเป็นชุด ๆ ละ 20 ชิ้นไว้เตรียมพร้อม → ลดเวลารอระหว่างรายการ - -### 3. ลดเวลารอเมื่อ API มีปัญหา (Timeout) -- **ก่อน:** ถ้า API ค้าง ระบบจะรอนานถึง **5 นาที** ต่อรายการ -- **หลัง:** ลดเหลือ **1 นาที** → รายการที่มีปัญหาจะถูกปฏิเสธเร็วขึ้น ไม่ทำให้คิวค้าง - -### 4. ปรับปรุงการเชื่อมต่อ HTTP -- เปลี่ยนระบบเชื่อมต่อให้รองรับการส่งคำขอหลายรายการพร้อมกันโดยไม่สะดุด - ---- - -## ตัวเลขเปรียบเทียบ - -| รายการ | ก่อนแก้ | หลังแก้ | -|---|---|---| -| จำนวนรายการที่ประมวลผลพร้อมกัน | 1 | 5 | -| เวลารอคิวสูงสุด (2,000 รายการ) | ~22 นาที | ~4–5 นาที | -| เวลารอเมื่อ API มีปัญหา | 5 นาที | 1 นาที | - ---- - -## ไฟล์ที่แก้ไข - -1. **`Program.cs`** — โค้ดหลักของตัวประมวลผลคิว -2. **`appsettings.json`** — ไฟล์ตั้งค่าระบบ - ---- - -## วิธีปรับความเร็วเพิ่มเติม (ไม่ต้องเขียนโค้ดใหม่) - -ถ้าหลังทดสอบแล้วเห็นว่าระบบรับได้ และอยากให้เร็วขึ้นอีก ให้แก้ไขไฟล์ `appsettings.json` แล้ว restart โปรแกรมได้เลย: - -```json -{ - "MaxConcurrency": 10, ← เพิ่มจาก 5 เป็น 10 (ประมวลผลพร้อมกัน 10 รายการ) - "PrefetchCount": 50, ← ควรตั้งเป็น ประมาณ MaxConcurrency × 2 ขึ้นไป - "HttpTimeoutSeconds": 60 ← เวลารอ API วินาที -} -``` - -**ค่าที่ใช้และผลที่คาดการณ์:** -- `MaxConcurrency = 5` → ใช้เวลา ~4–5 นาที (ค่าเริ่มต้นปลอดภัย) -- `MaxConcurrency = 10` → ใช้เวลา ~2–3 นาที -- `MaxConcurrency = 20` → ใช้เวลา ~1–2 นาที (ต้องตรวจสอบว่าระบบหลังบ้านรับไหวก่อน) - ---- - -## ข้อควรระวัง / คำแนะนำ - -1. **ควรทดสอบในระบบทดสอบก่อน** โดยดูว่า - - ไม่มี error ในระบบหลัก (API) - - ฐานข้อมูลไม่ช้าผิดปกติ - - ไม่พบปัญหาลงเวลาซ้ำซ้อน - -2. ถ้าพบปัญหา เช่น - - มี error ใน API → **ลด** `MaxConcurrency` เหลือ 2 หรือ 3 - - ลงเวลาซ้ำ → แจ้งทีมเทคนิคเพื่อแก้ฝั่ง API เพิ่มเติม - -3. **ค่า `MaxConcurrency = 5` เป็นค่าปลอดภัย** เพราะระบบ API ด้านหลังยังมีข้อจำกัดอยู่บางส่วน หากต้องการเพิ่มให้สูงกว่านี้ (เช่น 20–50) ควรปรึกษาทีมเทคนิคเพื่อปรับปรุงฝั่ง API ก่อน diff --git a/BMA.EHR.CheckInConsumer/Dockerfile b/BMA.EHR.CheckInConsumer/Dockerfile index 81c430d9..1c90d6f2 100644 --- a/BMA.EHR.CheckInConsumer/Dockerfile +++ b/BMA.EHR.CheckInConsumer/Dockerfile @@ -1,4 +1,4 @@ -## See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. +## See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. # ## This stage is used when running from VS in fast mode (Default for Debug configuration) #FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base @@ -21,7 +21,6 @@ #ARG BUILD_CONFIGURATION=Release #RUN dotnet publish "BMA.EHR.CheckInConsumer.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false # - ## This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration) #FROM base AS final #WORKDIR /app @@ -30,25 +29,30 @@ # ใช้ official .NET SDK image สำหรับการ build -# Note: Build context = repository root (ตามที่ GitHub Actions ใช้) FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +# กำหนด working directory ภายใน container WORKDIR /src -# copy เฉพาะ .csproj ก่อน เพื่อใช้ layer caching (restore เร็ว เก็บ cache นาน) -COPY BMA.EHR.CheckInConsumer/BMA.EHR.CheckInConsumer.csproj ./BMA.EHR.CheckInConsumer/ -WORKDIR /src/BMA.EHR.CheckInConsumer -RUN dotnet restore "BMA.EHR.CheckInConsumer.csproj" +# คัดลอกไฟล์ .csproj และ restore dependencies +# COPY *.csproj ./ +COPY . ./ +RUN dotnet restore -# คัดลอก source ที่เหลือแล้ว publish -COPY BMA.EHR.CheckInConsumer/ ./ -RUN dotnet publish "BMA.EHR.CheckInConsumer.csproj" -c Release -o /app/publish /p:UseAppHost=false +# คัดลอกไฟล์ทั้งหมดและ build +COPY . ./ +RUN dotnet build -c Release -o /app/build +# WORKDIR "/src/BMA.EHR.CheckInConsumer" +# RUN dotnet build "BMA.EHR.CheckInConsumer.csproj" -c Release -o /app/build -# ใช้ stage ใหม่สำหรับ runtime (image เล็กลง) +# ใช้ stage ใหม่สำหรับการ runtime FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime +# กำหนด working directory สำหรับ runtime WORKDIR /app -COPY --from=build /app/publish . +# คัดลอกไฟล์จาก build stage มายัง runtime stage +COPY --from=build /app/build . +# ระบุ entry point ของแอปพลิเคชัน ENTRYPOINT ["dotnet", "BMA.EHR.CheckInConsumer.dll"] diff --git a/BMA.EHR.CheckInConsumer/Program.cs b/BMA.EHR.CheckInConsumer/Program.cs index a0ff686c..1a5a68d1 100644 --- a/BMA.EHR.CheckInConsumer/Program.cs +++ b/BMA.EHR.CheckInConsumer/Program.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; using RabbitMQ.Client; using RabbitMQ.Client.Events; using System.Text; @@ -18,136 +18,84 @@ var user = configuration["Rabbit:User"] ?? ""; var pass = configuration["Rabbit:Password"] ?? ""; var queue = configuration["Rabbit:Queue"] ?? "basic-queue"; -// Concurrency & prefetch (configurable via appsettings.json) -var maxConcurrency = int.TryParse(configuration["MaxConcurrency"], out var c) && c > 0 ? c : 5; -var prefetchCount = ushort.TryParse(configuration["PrefetchCount"], out var p) && p > 0 ? p : (ushort)20; -var httpTimeoutSec = int.TryParse(configuration["HttpTimeoutSeconds"], out var t) && t > 0 ? t : 60; - -WriteToConsole($"Config -> MaxConcurrency: {maxConcurrency}, PrefetchCount: {prefetchCount}, HttpTimeout: {httpTimeoutSec}s"); - // create connection var factory = new ConnectionFactory() { - HostName = host, - UserName = user, - Password = pass, - DispatchConsumersAsync = true + //Uri = new Uri("amqp://admin:P@ssw0rd@192.168.4.11:5672") + HostName = host,// หรือ hostname ของ RabbitMQ Server ที่คุณใช้ + UserName = user, // ใส่ชื่อผู้ใช้ของคุณ + Password = pass // ใส่รหัสผ่านของคุณ }; using var connection = factory.CreateConnection(); using var channel = connection.CreateModel(); +//channel.QueueDeclare(queue: "bma-checkin-queue", durable: true, exclusive: false, autoDelete: false, arguments: null); channel.QueueDeclare(queue: queue, durable: true, exclusive: false, autoDelete: false, arguments: null); -// Prefetch: RabbitMQ จะส่ง message หลายตัวมาที่ consumer พร้อมกัน (ลด network round-trip) -channel.BasicQos(prefetchSize: 0, prefetchCount: prefetchCount, global: false); +var consumer = new EventingBasicConsumer(channel); -// HttpClient แบบ SocketsHttpHandler พร้อม connection pooling รองรับ concurrent requests -var socketsHandler = new SocketsHttpHandler +consumer.Received += async (model, ea) => { - MaxConnectionsPerServer = maxConcurrency * 2, - PooledConnectionLifetime = TimeSpan.FromMinutes(2), - PooledConnectionIdleTimeout = TimeSpan.FromSeconds(30) -}; -using var httpClient = new HttpClient(socketsHandler); -httpClient.Timeout = TimeSpan.FromSeconds(httpTimeoutSec); + var body = ea.Body.ToArray(); + var message = Encoding.UTF8.GetString(body); + await CallRestApi(message); -// SemaphoreSlim คุมจำนวน message ที่ประมวลผลพร้อมกัน (เนื่องจาก API มีข้อจำกัดเรื่อง concurrency) -using var semaphore = new SemaphoreSlim(maxConcurrency, maxConcurrency); + // convert string into object + //var request = JsonConvert.DeserializeObject(message); + //using (var db = new ApplicationDbContext()) + //{ + // var item = new AttendantItem + // { + // Name = request.Name, + // CheckInDateTime = request.CheckInDateTime, + // }; + // db.AttendantItems.Add(item); + // db.SaveChanges(); -var consumer = new AsyncEventingBasicConsumer(channel); + // WriteToConsole($"ได้รับคำขอจาก Queue: {message}"); + // WriteToConsole($"ตอบกลับจาก REST API: {JsonConvert.SerializeObject(item)}"); + //} -consumer.Received += (model, ea) => -{ - // รอ semaphore ก่อนเริ่มประมวลผล - semaphore.WaitAsync().ContinueWith(async _ => - { - try - { - var body = ea.Body.ToArray(); - var message = Encoding.UTF8.GetString(body); - - WriteToConsole($"Received message: {message}"); - - var success = await CallRestApi(message, httpClient, configuration); - - if (success) - { - channel.BasicAck(ea.DeliveryTag, multiple: false); - WriteToConsole("Message processed successfully"); - } - else - { - channel.BasicNack(ea.DeliveryTag, multiple: false, requeue: false); - WriteToConsole("Message processing failed - message rejected"); - } - } - catch (Exception ex) - { - WriteToConsole($"Error processing message: {ex.Message}"); - channel.BasicNack(ea.DeliveryTag, multiple: false, requeue: false); - } - finally - { - semaphore.Release(); - } - }, TaskScheduler.Default).ConfigureAwait(false); - - return Task.CompletedTask; + WriteToConsole($"ได้รับคำขอจาก Queue: {message}"); + //WriteToConsole($"ตอบกลับจาก REST API: {JsonConvert.SerializeObject(item)}"); }; -channel.BasicConsume(queue: queue, autoAck: false, consumer: consumer); +//channel.BasicConsume(queue: "bma-checkin-queue", autoAck: true, consumer: consumer); +channel.BasicConsume(queue: queue, autoAck: true, consumer: consumer); -WriteToConsole("Consumer started. Waiting for messages..."); +//Console.WriteLine("\nPress 'Enter' to exit the process..."); -// Keep the application running await Task.Delay(-1); static void WriteToConsole(string message) { - Console.WriteLine($"{DateTime.Now:yyyy-MM-dd HH:mm:ss} : {message}"); + Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} : {message}"); } -static async Task CallRestApi(string requestData, HttpClient client, IConfiguration configuration) +async Task CallRestApi(string requestData) { - try - { - var apiPath = $"{configuration["API"]}/leave/process-check-in"; - var content = new StringContent(requestData, Encoding.UTF8, "application/json"); + using var client = new HttpClient(); + var apiPath = $"{configuration["API"]}/leave/process-check-in"; - var response = await client.PostAsync(apiPath, content); + var content = new StringContent(requestData, Encoding.UTF8, "application/json"); - if (response.IsSuccessStatusCode) - { - var responseContent = await response.Content.ReadAsStringAsync(); - WriteToConsole($"API Success: {responseContent}"); - return true; - } - else - { - var errorMessage = await response.Content.ReadAsStringAsync(); - var res = JsonSerializer.Deserialize(errorMessage); - WriteToConsole($"API Error ({response.StatusCode}): {res?.Message ?? errorMessage}"); - return false; - } - } - catch (HttpRequestException ex) + var response = await client.PostAsync(apiPath, content); + + if (response.IsSuccessStatusCode) { - WriteToConsole($"HTTP Error: {ex.Message}"); - return false; + var responseContent = await response.Content.ReadAsStringAsync(); + WriteToConsole(responseContent); } - catch (TaskCanceledException ex) + else { - WriteToConsole($"Timeout: {ex.Message}"); - return false; - } - catch (Exception ex) - { - WriteToConsole($"Unexpected Error: {ex.Message}"); - return false; + var errorMessage = await response.Content.ReadAsStringAsync(); + var res = JsonSerializer.Deserialize(errorMessage); + WriteToConsole($"Error: {res.Message}"); } } + public class ResponseObject { [JsonPropertyName("status")] @@ -163,14 +111,28 @@ public class ResponseObject public class CheckTimeDtoRB { public Guid? CheckInId { get; set; } + + public double Lat { get; set; } = 0; + + public double Lon { get; set; } = 0; + + public string POI { get; set; } = string.Empty; + + public bool IsLocation { get; set; } = true; + public string? LocationName { get; set; } = string.Empty; + public string? Remark { get; set; } = string.Empty; + public Guid? UserId { get; set; } + public DateTime? CurrentDate { get; set; } + public string? CheckInFileName { get; set; } + public byte[]? CheckInFileBytes { get; set; } -} +} \ No newline at end of file diff --git a/BMA.EHR.CheckInConsumer/appsettings.json b/BMA.EHR.CheckInConsumer/appsettings.json index 1fbba85b..b180f90c 100644 --- a/BMA.EHR.CheckInConsumer/appsettings.json +++ b/BMA.EHR.CheckInConsumer/appsettings.json @@ -1,12 +1,9 @@ { - "Rabbit": { - "Host": "192.168.1.63", - "User": "admin", - "Password": "12345678", - "Queue": "hrms-checkin-queue-dev" - }, - "API": "https://localhost:7283/api/v1", - "MaxConcurrency": 5, - "PrefetchCount": 20, - "HttpTimeoutSeconds": 60 -} + "Rabbit": { + "Host": "192.168.1.40", + "User": "admin", + "Password": "Test123456", + "Queue": "bma-checkin-queue" + }, + "API": "https://localhost:7283/api/v1" +} \ No newline at end of file diff --git a/BMA.EHR.Command.Service/BMA.EHR.Command.Service.csproj b/BMA.EHR.Command.Service/BMA.EHR.Command.Service.csproj index 4bb04261..9e86639f 100644 --- a/BMA.EHR.Command.Service/BMA.EHR.Command.Service.csproj +++ b/BMA.EHR.Command.Service/BMA.EHR.Command.Service.csproj @@ -9,9 +9,6 @@ True . BMA.EHR.Command.Service - false - $(NoWarn);$(WarningsNotAsErrors) - diff --git a/BMA.EHR.Command.Service/Program.cs b/BMA.EHR.Command.Service/Program.cs index ea76fb2b..b9d846f4 100644 --- a/BMA.EHR.Command.Service/Program.cs +++ b/BMA.EHR.Command.Service/Program.cs @@ -115,15 +115,12 @@ var app = builder.Build(); app.UseHttpsRedirection(); app.UseCors(); - - app.UseMiddleware(); - app.UseAuthentication(); app.UseAuthorization(); app.UseDefaultFiles(); app.UseStaticFiles(); app.MapControllers(); - + app.UseMiddleware(); // apply migrations //await using var scope = app.Services.CreateAsyncScope(); diff --git a/BMA.EHR.Discipline.Service/BMA.EHR.Discipline.Service.csproj b/BMA.EHR.Discipline.Service/BMA.EHR.Discipline.Service.csproj index 9787eddb..b4da4155 100644 --- a/BMA.EHR.Discipline.Service/BMA.EHR.Discipline.Service.csproj +++ b/BMA.EHR.Discipline.Service/BMA.EHR.Discipline.Service.csproj @@ -1,20 +1,17 @@ - - net7.0 - enable - enable - 9d934a68-d1dd-449d-bde0-3078a774ad0f - Linux - True - . - BMA.EHR.Discipline.Service - false - $(NoWarn);$(WarningsNotAsErrors) + + net7.0 + enable + enable + 9d934a68-d1dd-449d-bde0-3078a774ad0f + Linux + True + . + BMA.EHR.Discipline.Service + - - - + @@ -39,10 +36,10 @@ - + - - - + + + diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs index f034f105..ca921ac9 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs @@ -8,15 +8,14 @@ using BMA.EHR.Infrastructure.Persistence; // using BMA.EHR.Placement.Service.Requests; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using Swashbuckle.AspNetCore.Annotations; -using System.Linq; -using System.Net.Http.Headers; using System.Runtime.Serialization; using System.Security.Claims; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Net.Http.Headers; namespace BMA.EHR.DisciplineComplaint.Service.Controllers { @@ -34,14 +33,12 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers private readonly NotificationRepository _repositoryNoti; private readonly PermissionRepository _permission; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; public DisciplineComplaintController(DisciplineDbContext context, MinIODisciplineService documentService, NotificationRepository repositoryNoti, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - UserProfileRepository userProfileRepository, PermissionRepository permission) { // _repository = repository; @@ -51,7 +48,6 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers _repositoryNoti = repositoryNoti; _permission = permission; _configuration = configuration; - _userProfileRepository = userProfileRepository; } #region " Properties " @@ -107,152 +103,6 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers return Success(new { data, total = data_search.Count() }); } - /// - /// list รายการวินัยเรื่องร้องเรียน (ค้นหาขั้นสูง) - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("advance-search")] - public async Task> GetAdvanceSearchDisciplineComplaint([FromBody] DisciplineComplaintAdvanceSearcRequest req) - { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_COMPLAIN"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - - var page = req.page <= 0 ? 1 : req.page; - var pageSize = req.pageSize <= 0 ? 25 : req.pageSize; - var keyword = string.IsNullOrEmpty(req.keyword) ? string.Empty : req.keyword; - var status = string.IsNullOrEmpty(req.status) ? string.Empty : req.status; - - var data_search = (from x in _context.DisciplineComplaints - where x.Title.Contains(keyword) || - (x.Appellant == null ? false : x.Appellant.Contains(keyword)) - select x).ToList(); - - if (status.Trim().ToUpper() != "ALL") - data_search = data_search.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); - - if ( - (req.dateReceivedStart.HasValue && req.dateReceivedEnd.HasValue) || - (req.dateConsiderationStart.HasValue && req.dateConsiderationEnd.HasValue) || - (!string.IsNullOrEmpty(req.respondentType)) || - (!string.IsNullOrEmpty(req.offenseDetails)) || - (!string.IsNullOrEmpty(req.levelConsideration)) - ) - { - data_search = data_search - .Where(x => - (!req.dateReceivedStart.HasValue || !req.dateReceivedEnd.HasValue || - (x.DateReceived.HasValue && - x.DateReceived.Value.Date <= req.dateReceivedStart.Value.Date && - x.DateReceived.Value.Date >= req.dateReceivedEnd.Value.Date)) - && - (!req.dateConsiderationStart.HasValue || !req.dateConsiderationEnd.HasValue || - (x.DateConsideration.HasValue && - x.DateConsideration.Value.Date <= req.dateConsiderationStart.Value.Date && - x.DateConsideration.Value.Date >= req.dateConsiderationEnd.Value.Date)) - && - (string.IsNullOrEmpty(req.respondentType) || x.RespondentType == req.respondentType) - && - (string.IsNullOrEmpty(req.offenseDetails) || x.OffenseDetails == req.offenseDetails) - && - (string.IsNullOrEmpty(req.levelConsideration) || x.LevelConsideration == req.levelConsideration) - ) - .ToList(); - } - - var query = data_search - .Select(x => new - { - Id = x.Id,//id ข้อมูลเรื่องร้องเรียน - Title = x.Title,//ชื่อเรื่อง - RespondentType = x.RespondentType, - Appellant = x.Appellant,//ผู้ถูกร้องเรียน - OffenseDetails = x.OffenseDetails,//ลักษณะความผิด - CreatedAt = x.CreatedAt,//วันที่สร้างเรื่องร้องเรียน - LevelConsideration = x.LevelConsideration,//ระดับการพิจารณา - DateConsideration = x.DateConsideration,//วันที่กำหนดพิจารณา - DateReceived = x.DateReceived,//วันที่รับเรื่อง - Status = x.Status,//สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE) - Result = x.Result, - }); - - bool desc = req.descending ?? false; - if (!string.IsNullOrEmpty(req.sortBy)) - { - switch (req.sortBy) - { - case "title": - query = desc ? query.OrderByDescending(x => x.Title) - : query.OrderBy(x => x.Title); - break; - - case "respondentType": - query = desc ? query.OrderByDescending(x => x.RespondentType) - : query.OrderBy(x => x.RespondentType); - break; - - case "appellant": - query = desc ? query.OrderByDescending(x => x.Appellant) - : query.OrderBy(x => x.Appellant); - break; - - case "offenseDetails": - query = desc ? query.OrderByDescending(x => x.OffenseDetails) - : query.OrderBy(x => x.OffenseDetails); - break; - - case "createdAt": - query = desc ? query.OrderByDescending(x => x.CreatedAt) - : query.OrderBy(x => x.CreatedAt); - break; - - case "levelConsideration": - query = desc ? query.OrderByDescending(x => x.LevelConsideration) - : query.OrderBy(x => x.LevelConsideration); - break; - - case "dateConsideration": - query = desc ? query.OrderByDescending(x => x.DateConsideration) - : query.OrderBy(x => x.DateConsideration); - break; - - case "dateReceived": - query = desc ? query.OrderByDescending(x => x.DateReceived) - : query.OrderBy(x => x.DateReceived); - break; - - case "status": - query = desc ? query.OrderByDescending(x => x.Status) - : query.OrderBy(x => x.Status); - break; - - case "result": - query = desc ? query.OrderByDescending(x => x.Result) - : query.OrderBy(x => x.Result); - break; - - default: - query = query.OrderByDescending(x => x.DateConsideration); - break; - } - - } - - var data = query - .Skip((page - 1) * pageSize) - .Take(pageSize) - .ToList(); - - return Success(new { data, total = data_search.Count() }); - } - /// /// list รายการวินัยเรื่องร้องเรียนในหน้าออกคำสั่ง /// @@ -449,11 +299,6 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var profile = await _userProfileRepository.GetUserOC(userId, token.Replace("Bearer ", "")); - if (profile == null) - return Error(GlobalMessages.DataNotFound); var disciplineComplaint = new Domain.Models.Discipline.DisciplineComplaint { RespondentType = req.respondentType.Trim().ToUpper(), @@ -465,7 +310,6 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers Title = req.title, Description = req.description, DateReceived = req.dateReceived, - RootDnaId = profile.RootDnaId, LevelConsideration = req.levelConsideration == null ? null : req.levelConsideration.Trim().ToUpper(), DateConsideration = req.dateConsideration, OffenseDetails = req.offenseDetails == null ? null : req.offenseDetails.Trim().ToUpper(), @@ -738,7 +582,6 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers { RespondentType = data.RespondentType.Trim().ToUpper(), Organization = data.Organization, - RootDnaId = data.RootDnaId, ConsideredAgency = data.ConsideredAgency, OrganizationId = data.OrganizationId, ConsideredAgencyId = data.ConsideredAgencyId, @@ -837,7 +680,7 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = persons.Select(x => x.PersonId), diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs index 619756c2..1208d103 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs @@ -1,6 +1,5 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Discipline.Service.Requests; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; @@ -33,7 +32,6 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers private readonly IHttpContextAccessor _httpContextAccessor; private readonly NotificationRepository _repositoryNoti; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; public DisciplineComplaint_AppealController(DisciplineDbContext context, @@ -42,7 +40,6 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers MinIODisciplineService documentService, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - UserProfileRepository userProfileRepository, PermissionRepository permission) { // _repository = repository; @@ -52,7 +49,6 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _configuration = configuration; - _userProfileRepository = userProfileRepository; _permission = permission; } @@ -62,8 +58,6 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; private static string StatusDisciplineComplaintAppeal(string value) { switch (value) @@ -90,15 +84,14 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpGet("user")] - public async Task> GetDisciplineUser(string status = "ALL", string type = "ALL", int year = 0, int page = 1, int pageSize = 25, string keyword = "", string? sortBy = null, bool descending = false) + public async Task> GetDisciplineUser(string status = "ALL", string type = "ALL", int year = 0, int page = 1, int pageSize = 25, string keyword = "") { var id = ""; - //var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; - var apiUrl = $"{_configuration["API"]}/org/dotnet/get-profileId"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -126,7 +119,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers data_search = data_search.Where(x => x.Type == type).ToList(); if (year != 0) data_search = data_search.Where(x => x.Year == year).ToList(); - var query = data_search + var data = data_search .Select(x => new { Id = x.Id, @@ -142,45 +135,11 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers ProfileId = x.ProfileId, LastUpdatedAt = x.LastUpdatedAt, CreatedAt = x.CreatedAt - }); - if (!string.IsNullOrEmpty(sortBy)) - { - { - if (sortBy == "title") - query = descending ? query.OrderByDescending(x => x.Title) : query.OrderBy(x => x.Title); - else if (sortBy == "year") - query = descending ? query.OrderByDescending(x => x.Year) : query.OrderBy(x => x.Year); - else if (sortBy == "status") - query = descending ? query.OrderByDescending(x => x.Status) : query.OrderBy(x => x.Status); - else if (sortBy == "description") - query = descending ? query.OrderByDescending(x => x.Description) : query.OrderBy(x => x.Description); - else if (sortBy == "type") - query = descending ? query.OrderByDescending(x => x.Type) : query.OrderBy(x => x.Type); - else if (sortBy == "caseType") - query = descending ? query.OrderByDescending(x => x.CaseType) : query.OrderBy(x => x.CaseType); - else if (sortBy == "caseNumber") - query = descending ? query.OrderByDescending(x => x.CaseNumber) : query.OrderBy(x => x.CaseNumber); - else if (sortBy == "fullname") - query = descending ? query.OrderByDescending(x => x.Fullname) : query.OrderBy(x => x.Fullname); - else if (sortBy == "citizenId") - query = descending ? query.OrderByDescending(x => x.CitizenId) : query.OrderBy(x => x.CitizenId); - else if (sortBy == "lastUpdatedAt") - query = descending ? query.OrderByDescending(x => x.LastUpdatedAt) : query.OrderBy(x => x.LastUpdatedAt); - else if (sortBy == "createdAt") - query = descending ? query.OrderByDescending(x => x.CreatedAt) : query.OrderBy(x => x.CreatedAt); - else - query = query.OrderByDescending(x => x.CreatedAt); // default - } - } - else - { - query = query.OrderByDescending(x => x.CreatedAt); - } - - var data = query - .Skip((page - 1) * pageSize) - .Take(pageSize) - .ToList(); + }) + .OrderByDescending(x => x.CreatedAt) + .Skip((page - 1) * pageSize) + .Take(pageSize) + .ToList(); return Success(new { data, total = data_search.Count() }); } } @@ -358,15 +317,12 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers [HttpPost()] public async Task> CreateDiscipline([FromForm] DisciplineComplaint_AppealRequest req) { - //var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; - var apiUrl = $"{_configuration["API"]}/org/dotnet/get-profileId"; - var id = ""; - var type = ""; + + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { - client.DefaultRequestHeaders.Authorization = - new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -375,116 +331,78 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers if (org == null || org.result == null) return Success(new { data = new List(), total = 0 }); - id = org.result.profileId; + var id = org.result.profileId; if (id == "") return Success(new { data = new List(), total = 0 }); - type = org.result.profileType; - } - - var disciplineComplaint_Appeal = new Domain.Models.Discipline.DisciplineComplaint_Appeal - { - Title = req.Title, - Description = req.Description, - Status = "NEW", - Type = req.Type.Trim().ToUpper(), - Year = req.Year == null ? DateTime.Now.CalculateFisicalYear() : req.Year, - CaseType = req.CaseType, - CaseNumber = req.CaseNumber, - Fullname = req.Fullname, - CitizenId = req.CitizenId, - ProfileId = id, - Position = req.Position, - Oc = req.Oc, - profileType = type, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }; - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var _apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{id}"; - var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); - var _res = await client.SendAsync(_req); - var _result = await _res.Content.ReadAsStringAsync(); - - var org = JsonConvert.DeserializeObject(_result); - - if (org == null || org.result == null) - return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); - - disciplineComplaint_Appeal.root = org.result.root; - disciplineComplaint_Appeal.rootId = org.result.rootId; - disciplineComplaint_Appeal.rootDnaId = org.result.rootDnaId; - disciplineComplaint_Appeal.child1 = org.result.child1; - disciplineComplaint_Appeal.child1Id = org.result.child1Id; - disciplineComplaint_Appeal.child1DnaId = org.result.child1DnaId; - disciplineComplaint_Appeal.child2 = org.result.child2; - disciplineComplaint_Appeal.child2Id = org.result.child2Id; - disciplineComplaint_Appeal.child2DnaId = org.result.child2DnaId; - disciplineComplaint_Appeal.child3 = org.result.child3; - disciplineComplaint_Appeal.child3Id = org.result.child3Id; - disciplineComplaint_Appeal.child3DnaId = org.result.child3DnaId; - disciplineComplaint_Appeal.child4 = org.result.child4; - disciplineComplaint_Appeal.child4Id = org.result.child4Id; - disciplineComplaint_Appeal.child4DnaId = org.result.child4DnaId; - } - var disciplineComplaint_Appeal_History = new DisciplineComplaint_Appeal_History - { - DisciplineComplaint_Appeal = disciplineComplaint_Appeal, - Status = "NEW", - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }; - // await _context.DisciplineComplaint_Appeals.AddAsync(disciplineComplaint_Appeal); - await _context.DisciplineComplaint_Appeal_Historys.AddAsync(disciplineComplaint_Appeal_History); - await _context.SaveChangesAsync(); - if (Request.Form.Files != null && Request.Form.Files.Count != 0) - { - foreach (var file in Request.Form.Files) + var disciplineComplaint_Appeal = new Domain.Models.Discipline.DisciplineComplaint_Appeal { - var fileExtension = Path.GetExtension(file.FileName); - var doc = await _documentService.UploadFileAsync(file, file.FileName); - var _doc = await _context.Documents.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == doc.Id); - if (_doc != null) + Title = req.Title, + Description = req.Description, + Status = "NEW", + Type = req.Type.Trim().ToUpper(), + Year = req.Year == null ? DateTime.Now.Year : req.Year, + CaseType = req.CaseType, + CaseNumber = req.CaseNumber, + Fullname = req.Fullname, + CitizenId = req.CitizenId, + ProfileId = id, + Position = req.Position, + Oc = req.Oc, + profileType = org.result.profileType, + CreatedFullName = FullName ?? "System Administrator", + CreatedUserId = UserId ?? "", + CreatedAt = DateTime.Now, + LastUpdateFullName = FullName ?? "System Administrator", + LastUpdateUserId = UserId ?? "", + LastUpdatedAt = DateTime.Now, + }; + var disciplineComplaint_Appeal_History = new DisciplineComplaint_Appeal_History + { + DisciplineComplaint_Appeal = disciplineComplaint_Appeal, + Status = "NEW", + CreatedFullName = FullName ?? "System Administrator", + CreatedUserId = UserId ?? "", + CreatedAt = DateTime.Now, + LastUpdateFullName = FullName ?? "System Administrator", + LastUpdateUserId = UserId ?? "", + LastUpdatedAt = DateTime.Now, + }; + // await _context.DisciplineComplaint_Appeals.AddAsync(disciplineComplaint_Appeal); + await _context.DisciplineComplaint_Appeal_Historys.AddAsync(disciplineComplaint_Appeal_History); + await _context.SaveChangesAsync(); + if (Request.Form.Files != null && Request.Form.Files.Count != 0) + { + foreach (var file in Request.Form.Files) { - var disciplineComplaint_Appeal_Doc = new DisciplineComplaint_Appeal_Doc + var fileExtension = Path.GetExtension(file.FileName); + var doc = await _documentService.UploadFileAsync(file, file.FileName); + var _doc = await _context.Documents.AsQueryable() + .FirstOrDefaultAsync(x => x.Id == doc.Id); + if (_doc != null) { - DisciplineComplaint_Appeal = disciplineComplaint_Appeal, - Document = _doc, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }; - await _context.DisciplineComplaint_Appeal_Docs.AddAsync(disciplineComplaint_Appeal_Doc); + var disciplineComplaint_Appeal_Doc = new DisciplineComplaint_Appeal_Doc + { + DisciplineComplaint_Appeal = disciplineComplaint_Appeal, + Document = _doc, + CreatedFullName = FullName ?? "System Administrator", + CreatedUserId = UserId ?? "", + CreatedAt = DateTime.Now, + LastUpdateFullName = FullName ?? "System Administrator", + LastUpdateUserId = UserId ?? "", + LastUpdatedAt = DateTime.Now, + }; + await _context.DisciplineComplaint_Appeal_Docs.AddAsync(disciplineComplaint_Appeal_Doc); + } } } - } - var baseAPIOrg = _configuration["API"]; - var system = "SYS_DISCIPLINE_APPEAL"; - var apiUrlOrg = $"{baseAPIOrg}/org/workflow/find/director/{system}"; - var refId = new List(); - - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = - new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/workflow/find/director"; + var refId = new List(); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var __res = await client.PostAsJsonAsync(apiUrlOrg, new { - refId = new List { Guid.Parse(id) }, + refId = new List { id }, }); var __result = await __res.Content.ReadAsStringAsync(); var __org = JsonConvert.DeserializeObject(__result); @@ -492,7 +410,6 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers { refId = __org.result.Select(x => Guid.Parse(x.id)).ToList(); } - await _repositoryNoti.PushNotificationsAsync( refId.ToArray(), $"มีคำขอยื่นอุทธรณ์/ร้องทุกข์จาก {req.Fullname}", @@ -502,10 +419,10 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers true, true ); + await _context.SaveChangesAsync(); + return Success(disciplineComplaint_Appeal.Id); } - await _context.SaveChangesAsync(); - return Success(disciplineComplaint_Appeal.Id); } /// @@ -541,37 +458,6 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.ProfileId}"; - var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); - var _res = await client.SendAsync(_req); - var _result = await _res.Content.ReadAsStringAsync(); - - var org = JsonConvert.DeserializeObject(_result); - - if (org == null || org.result == null) - return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); - - disciplineComplaint_Appeal.root = org.result.root; - disciplineComplaint_Appeal.rootId = org.result.rootId; - disciplineComplaint_Appeal.rootDnaId = org.result.rootDnaId; - disciplineComplaint_Appeal.child1 = org.result.child1; - disciplineComplaint_Appeal.child1Id = org.result.child1Id; - disciplineComplaint_Appeal.child1DnaId = org.result.child1DnaId; - disciplineComplaint_Appeal.child2 = org.result.child2; - disciplineComplaint_Appeal.child2Id = org.result.child2Id; - disciplineComplaint_Appeal.child2DnaId = org.result.child2DnaId; - disciplineComplaint_Appeal.child3 = org.result.child3; - disciplineComplaint_Appeal.child3Id = org.result.child3Id; - disciplineComplaint_Appeal.child3DnaId = org.result.child3DnaId; - disciplineComplaint_Appeal.child4 = org.result.child4; - disciplineComplaint_Appeal.child4Id = org.result.child4Id; - disciplineComplaint_Appeal.child4DnaId = org.result.child4DnaId; - } var disciplineComplaint_Appeal_History = new DisciplineComplaint_Appeal_History { DisciplineComplaint_Appeal = disciplineComplaint_Appeal, @@ -612,14 +498,13 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers } } var baseAPIOrg = _configuration["API"]; - var system = "SYS_DISCIPLINE_APPEAL"; - var apiUrlOrg = $"{baseAPIOrg}/org/workflow/find/director/{system}"; + var apiUrlOrg = $"{baseAPIOrg}/org/workflow/find/director"; var refId = new List(); using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var __res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = new List { Guid.Parse(req.ProfileId) }, @@ -748,7 +633,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpGet("admin")] - public async Task> GetDisciplineAdmin(string status = "ALL", string type = "ALL", int year = 0, int page = 1, int pageSize = 25, string keyword = "", string? sortBy = "", bool? descending = false) + public async Task> GetDisciplineAdmin(string status = "ALL", string type = "ALL", int year = 0, int page = 1, int pageSize = 25, string keyword = "") { var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_APPEAL"); var jsonData = JsonConvert.DeserializeObject(getPermission); @@ -756,42 +641,6 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; var data_search = (from x in _context.DisciplineComplaint_Appeals where (x.Title == null ? false : x.Title.Contains(keyword)) || (x.Description == null ? false : x.Description.Contains(keyword)) || @@ -806,43 +655,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers data_search = data_search.Where(x => x.Type == type).ToList(); if (year != 0) data_search = data_search.Where(x => x.Year == year).ToList(); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - data_search = data_search - .Where(x => node == 4 ? x.child4DnaId == nodeId : (node == 3 ? x.child3DnaId == nodeId : (node == 2 ? x.child2DnaId == nodeId : (node == 1 ? x.child1DnaId == nodeId : (node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - data_search = data_search - .Where(x => node == 4 ? x.child3DnaId == nodeId : (node == 3 ? x.child2DnaId == nodeId : (node == 2 ? x.child1DnaId == nodeId : (node == 1 || node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - data_search = data_search - .Where(x => x.rootDnaId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // data_search = data_search - // .Where(x => x.rootDnaId == nodeId && x.child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - data_search = data_search.Where(x => - node == 0 ? x.rootDnaId == nodeId && x.child1DnaId == null : - node == 1 ? x.child1DnaId == nodeId && x.child2DnaId == null : - node == 2 ? x.child2DnaId == nodeId && x.child3DnaId == null : - node == 3 ? x.child3DnaId == nodeId && x.child4DnaId == null : - node == 4 ? x.child4DnaId == nodeId : - true - ).ToList(); - } - var query = data_search + var data = data_search .Select(x => new { Id = x.Id, @@ -858,76 +671,12 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers ProfileId = x.ProfileId, LastUpdatedAt = x.LastUpdatedAt, profileType = x.profileType - }); - bool desc = descending ?? false; - if (!string.IsNullOrEmpty(sortBy)) - { - switch (sortBy) - { - case "title": - query = desc ? query.OrderByDescending(x => x.Title) - : query.OrderBy(x => x.Title); - break; - - case "description": - query = desc ? query.OrderByDescending(x => x.Description) - : query.OrderBy(x => x.Description); - break; - - case "status": - query = desc ? query.OrderByDescending(x => x.Status) - : query.OrderBy(x => x.Status); - break; - - case "type": - query = desc ? query.OrderByDescending(x => x.Type) - : query.OrderBy(x => x.Type); - break; - - case "year": - query = desc ? query.OrderByDescending(x => x.Year) - : query.OrderBy(x => x.Year); - break; - - case "caseType": - query = desc ? query.OrderByDescending(x => x.CaseType) - : query.OrderBy(x => x.CaseType); - break; - - case "caseNumber": - query = desc ? query.OrderByDescending(x => x.CaseNumber) - : query.OrderBy(x => x.CaseNumber); - break; - - case "fullname": - query = desc ? query.OrderByDescending(x => x.Fullname) - : query.OrderBy(x => x.Fullname); - break; - - case "lastUpdatedAt": - query = desc ? query.OrderByDescending(x => x.LastUpdatedAt) - : query.OrderBy(x => x.LastUpdatedAt); - break; - - case "profileType": - query = desc ? query.OrderByDescending(x => x.profileType) - : query.OrderBy(x => x.profileType); - break; - - default: - query = query + }) .OrderByDescending(x => x.profileType) - .ThenByDescending(x => x.LastUpdatedAt); - break; - } - - } - - var data = query - .Skip((page - 1) * pageSize) - .Take(pageSize) - .ToList(); - + .ThenByDescending(x => x.LastUpdatedAt) + .Skip((page - 1) * pageSize) + .Take(pageSize) + .ToList(); return Success(new { data, total = data_search.Count() }); } diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineDirectorController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineDirectorController.cs index c4bd24ae..26a0c293 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineDirectorController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineDirectorController.cs @@ -29,12 +29,10 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers private readonly MinIOService _documentService; private readonly IHttpContextAccessor _httpContextAccessor; private readonly PermissionRepository _permission; - private readonly UserProfileRepository _userProfileRepository; public DisciplineDirectorController(DisciplineDbContext context, MinIOService documentService, IHttpContextAccessor httpContextAccessor, - UserProfileRepository userProfileRepository, PermissionRepository permission) { // _repository = repository; @@ -42,7 +40,6 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _permission = permission; - _userProfileRepository = userProfileRepository; } #region " Properties " @@ -50,7 +47,6 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value; private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; - private string? token => _httpContextAccessor.HttpContext.Request.Headers["Authorization"]; #endregion @@ -63,9 +59,8 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpGet("{path}")] - public async Task> GetDiscipline(string path, int page = 1, int pageSize = 25, string keyword = "", string? sortBy = "", bool? descending = false) + public async Task> GetDiscipline(string path, int page = 1, int pageSize = 25, string keyword = "") { - // สิทธิ์การเข้าถึง path = path.Trim().ToUpper(); string getPermission; if (path == "MAIN") @@ -85,27 +80,23 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_INFO"); } + var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - var _permiss = jsonData["result"]?.ToString(); - // สิทธิ์มองเห็นรายชื่อ - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var profile = await _userProfileRepository.GetUserOC(userId, token.Replace("Bearer ", "")); - if (profile == null) - return Error(GlobalMessages.DataNotFound); - var data_search = (from x in _context.DisciplineDirectors.Include(x => x.DisciplineInvestigate_Directors).Include(x => x.DisciplineDisciplinary_DirectorInvestigates) - where (((x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) || + where /*x.Prefix.Contains(keyword) || + x.FirstName.Contains(keyword) || + x.LastName.Contains(keyword) ||*/ + ((x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) || x.Position.Contains(keyword) || x.Email.Contains(keyword) || x.Phone.Contains(keyword) || - x.Qualification.Contains(keyword)) && - (_permiss != "OWNER" && x.RootDnaId == profile.RootDnaId || _permiss == "OWNER" && true) + x.Qualification.Contains(keyword) select x).ToList(); - var query = data_search + var data = data_search .Select(x => new { Id = x.Id, @@ -118,66 +109,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers Qualification = x.Qualification, TotalInvestigate = x.DisciplineInvestigate_Directors.Count(), TotalDisciplinary = x.DisciplineDisciplinary_DirectorInvestigates.Count(), - }); - - bool desc = descending ?? false; - if (!string.IsNullOrEmpty(sortBy)) - { - if (sortBy == "position") - { - query = desc ? query.OrderByDescending(x => x.Position) - : query.OrderBy(x => x.Position); - } - else if (sortBy == "prefix" || sortBy == "firstName" || sortBy == "lastName") - { - query = desc ? - query - //.OrderByDescending(x => x.Prefix) - .OrderByDescending(x => x.FirstName) - .ThenByDescending(x => x.LastName) : - query - //.OrderBy(x => x.Prefix) - .OrderBy(x => x.FirstName) - .ThenBy(x => x.LastName); - } - else if (sortBy == "email") - { - { - query = desc ? query.OrderByDescending(x => x.Email) - : query.OrderBy(x => x.Email); - } - } - else if (sortBy == "phone") - { - { - query = desc ? query.OrderByDescending(x => x.Phone) - : query.OrderBy(x => x.Phone); - } - } - else if (sortBy == "qualification") - { - { - query = desc ? query.OrderByDescending(x => x.Qualification) - : query.OrderBy(x => x.Qualification); - } - } - else if (sortBy == "totalInvestigate") - { - { - query = desc ? query.OrderByDescending(x => x.TotalInvestigate) - : query.OrderBy(x => x.TotalInvestigate); - } - } - else if (sortBy == "totalDisciplinary") - { - { - query = desc ? query.OrderByDescending(x => x.TotalDisciplinary) - : query.OrderBy(x => x.TotalDisciplinary); - } - } - } - - var data = query + }) .Skip((page - 1) * pageSize) .Take(pageSize) .ToList(); @@ -256,7 +188,6 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers Email = req.email, Phone = req.phone, Qualification = req.qualification, - RootDnaId = req.rootDnaId, CreatedFullName = FullName ?? "System Administrator", CreatedUserId = UserId ?? "", CreatedAt = DateTime.Now, @@ -348,13 +279,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers if (director == null) return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound); - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var profile = await _userProfileRepository.GetUserOC(userId, token.Replace("Bearer ", "")); - if (profile == null) - return Error(GlobalMessages.DataNotFound); - var data = await _context.DisciplineInvestigates - .Where(x => x.RootDnaId == profile.RootDnaId || x.RootDnaId == null) .Where(x => x.DisciplineInvestigate_Directors .Where(x => x.DisciplineDirector == director) .FirstOrDefault() != null @@ -391,13 +316,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers if (director == null) return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound); - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNewAsync(userId, token.Replace("Bearer ", "")); - if (profile == null) - return Error(GlobalMessages.DataNotFound); - var data = await _context.DisciplineDisciplinarys - .Where(x => x.RootDnaId == profile.RootDnaId || x.RootDnaId == null) .Where(x => x.DisciplineDisciplinary_DirectorInvestigates .Where(x => x.DisciplineDirector == director) .FirstOrDefault() != null diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs index b3de6c5b..9b3ac6ae 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs @@ -100,157 +100,6 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers return Success(new { data, total = data_search.Count() }); } - /// - /// list รายการวินัยเรื่องสอบสวน (ค้นหาขั้นสูง) - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("advance-search")] - public async Task> GetAdvanceSearcDisciplineDisciplinary([FromBody] DisciplineDisciplinaryAdvanceSearcRequest req) - { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_INTERROGATE"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - - var page = req.page <= 0 ? 1 : req.page; - var pageSize = req.pageSize <= 0 ? 25 : req.pageSize; - var keyword = string.IsNullOrEmpty(req.keyword) ? string.Empty : req.keyword; - var status = string.IsNullOrEmpty(req.status) ? string.Empty : req.status; - - var data_search = (from x in _context.DisciplineDisciplinarys - where x.Title.Contains(keyword) || - x.DisciplinaryFaultLevel.Contains(keyword) || - x.DisciplinaryCaseFault.Contains(keyword) - select x).ToList(); - if (status.Trim().ToUpper() != "ALL") - data_search = data_search.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); - - if ( - (req.disciplinaryDateStart.HasValue && req.disciplinaryDateEnd.HasValue) || - (req.dateReceivedStart.HasValue && req.dateReceivedEnd.HasValue) || - (!string.IsNullOrEmpty(req.respondentType)) || - (!string.IsNullOrEmpty(req.offenseDetails)) || - (!string.IsNullOrEmpty(req.disciplinaryFaultLevel)) || - (!string.IsNullOrEmpty(req.disciplinaryCaseFault)) - ) - { - data_search = data_search - .Where(x => - //วันที่รับเรือง - (!req.dateReceivedStart.HasValue || !req.dateReceivedEnd.HasValue || - (x.DateReceived.HasValue && - x.DateReceived.Value.Date <= req.dateReceivedStart.Value.Date && - x.DateReceived.Value.Date >= req.dateReceivedEnd.Value.Date)) - && - //วันที่สอบสวน - (!req.disciplinaryDateStart.HasValue || !req.disciplinaryDateEnd.HasValue || - (x.DisciplinaryDateStart.HasValue && x.DisciplinaryDateEnd.HasValue && - x.DisciplinaryDateStart.Value.Date <= req.disciplinaryDateStart.Value.Date && - x.DisciplinaryDateEnd.Value.Date >= req.disciplinaryDateEnd.Value.Date)) - && - (string.IsNullOrEmpty(req.respondentType) || x.RespondentType == req.respondentType) - && - (string.IsNullOrEmpty(req.offenseDetails) || x.OffenseDetails == req.offenseDetails) - && - (string.IsNullOrEmpty(req.disciplinaryFaultLevel) || x.DisciplinaryFaultLevel == req.disciplinaryFaultLevel) - && - (string.IsNullOrEmpty(req.disciplinaryCaseFault) || (x.DisciplinaryCaseFault?.Contains(req.disciplinaryCaseFault) ?? false)) - ) - .ToList(); - } - - var query = data_search - .Select(x => new - { - Id = x.Id,//id ข้อมูลเรื่องสอบสวน - Title = x.Title,//ชื่อเรื่อง - RespondentType = x.RespondentType,//ผู้ถูกสืบสวน - OffenseDetails = x.OffenseDetails,//ลักษณะความผิด - DisciplinaryFaultLevel = x.DisciplinaryFaultLevel,//ระดับโทษความผิด - DisciplinaryCaseFault = x.DisciplinaryCaseFault,//กรณีความผิด - Status = x.Status,//สถานะหรือผลการสอบสวน - DateReceived = x.DateReceived, //วันที่รับเรื่อง - CreatedAt = x.CreatedAt,//วันที่สร้างเรื่องสอบสวน - DisciplinaryDateStart = x.DisciplinaryDateStart, //วันที่เริ่มการสอบสวน - DisciplinaryDateEnd = x.DisciplinaryDateEnd, //วันที่สิ้นสุดการสอบสวน - }); - - bool desc = req.descending ?? false; - if (!string.IsNullOrEmpty(req.sortBy)) - { - switch (req.sortBy) - { - case "title": - query = desc ? query.OrderByDescending(x => x.Title) - : query.OrderBy(x => x.Title); - break; - - case "respondentType": - query = desc ? query.OrderByDescending(x => x.RespondentType) - : query.OrderBy(x => x.RespondentType); - break; - - case "offenseDetails": - query = desc ? query.OrderByDescending(x => x.OffenseDetails) - : query.OrderBy(x => x.OffenseDetails); - break; - - case "disciplinaryFaultLevel": - query = desc ? query.OrderByDescending(x => x.DisciplinaryFaultLevel) - : query.OrderBy(x => x.DisciplinaryFaultLevel); - break; - - case "disciplinaryCaseFault": - query = desc ? query.OrderByDescending(x => x.DisciplinaryCaseFault) - : query.OrderBy(x => x.DisciplinaryCaseFault); - break; - - case "status": - query = desc ? query.OrderByDescending(x => x.Status) - : query.OrderBy(x => x.Status); - break; - - case "dateReceived": - query = desc ? query.OrderByDescending(x => x.DateReceived) - : query.OrderBy(x => x.DateReceived); - break; - - case "createdAt": - query = desc ? query.OrderByDescending(x => x.CreatedAt) - : query.OrderBy(x => x.CreatedAt); - break; - - case "disciplinaryDateStart": - query = desc ? query.OrderByDescending(x => x.DisciplinaryDateStart) - : query.OrderBy(x => x.DisciplinaryDateStart); - break; - - case "disciplinaryDateEnd": - query = desc ? query.OrderByDescending(x => x.DisciplinaryDateEnd) - : query.OrderBy(x => x.DisciplinaryDateEnd); - break; - - default: - query = query.OrderByDescending(x => x.DisciplinaryDateStart); - break; - } - - } - - var data = query - .Skip((page - 1) * pageSize) - .Take(pageSize) - .ToList(); - - return Success(new { data, total = data_search.Count() }); - } - /// /// get รายการวินัยเรื่องสอบสวน /// @@ -1712,7 +1561,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - foreach (var item in req.id) + foreach (var item in req.Id) { var uppdated = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .FirstOrDefaultAsync(x => x.Id == item); diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs index 4bd7918e..c25438d2 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs @@ -100,153 +100,6 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers return Success(new { data, total = data_search.Count() }); } - /// - /// list รายการวินัยเรื่องสืบสวน (ค้นหาขั้นสูง) - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("advance-search")] - public async Task> GetAdvanceSearchDisciplineInvestigate([FromBody] DisciplineInvestigateAdvanceSearcRequest req) - { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_INVESTIGATE"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var page = req.page <= 0 ? 1 : req.page; - var pageSize = req.pageSize <= 0 ? 25 : req.pageSize; - var keyword = string.IsNullOrEmpty(req.keyword) ? string.Empty : req.keyword; - var status = string.IsNullOrEmpty(req.status) ? string.Empty : req.status; - - var data_search = (from x in _context.DisciplineInvestigates - where x.Title.Contains(keyword) - select x).ToList(); - if (status.Trim().ToUpper() != "ALL") - data_search = data_search.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); - - if ( - (req.investigationDateStart.HasValue && req.investigationDateEnd.HasValue) || - (req.dateReceivedStart.HasValue && req.dateReceivedEnd.HasValue) || - (!string.IsNullOrEmpty(req.respondentType)) || - (!string.IsNullOrEmpty(req.offenseDetails)) || - (!string.IsNullOrEmpty(req.investigationDetail)) || - (!string.IsNullOrEmpty(req.investigationStatusResult)) - ) - { - data_search = data_search - .Where(x => - (!req.dateReceivedStart.HasValue || !req.dateReceivedEnd.HasValue || - (x.DateReceived.HasValue && - x.DateReceived.Value.Date <= req.dateReceivedStart.Value.Date && - x.DateReceived.Value.Date >= req.dateReceivedEnd.Value.Date)) - && - (!req.investigationDateStart.HasValue || !req.investigationDateEnd.HasValue || - (x.InvestigationDateStart.HasValue && x.InvestigationDateEnd.HasValue && - x.InvestigationDateStart.Value.Date <= req.investigationDateStart.Value.Date && - x.InvestigationDateEnd.Value.Date >= req.investigationDateEnd.Value.Date)) - && - (string.IsNullOrEmpty(req.respondentType) || x.RespondentType == req.respondentType) - && - (string.IsNullOrEmpty(req.offenseDetails) || x.OffenseDetails == req.offenseDetails) - && - (string.IsNullOrEmpty(req.investigationDetail) || x.InvestigationDetail == req.investigationDetail) - && - (string.IsNullOrEmpty(req.investigationStatusResult) || x.InvestigationStatusResult == req.investigationStatusResult) - ) - .ToList(); - } - - var query = data_search - .Select(x => new - { - Id = x.Id,//id ข้อมูลเรื่องสืบสวน - Title = x.Title,//ชื่อเรื่อง - RespondentType = x.RespondentType,//ผู้ถูกสืบสวน - OffenseDetails = x.OffenseDetails,//ลักษณะความผิด - Status = x.Status,//สถานะหรือผลการสืบสวน - InvestigationDateStart = x.InvestigationDateStart, //วันที่เริ่มการสืบสวน - InvestigationDateEnd = x.InvestigationDateEnd, //วันที่สิ้นสุดการสืบสวน - DateReceived = x.DateReceived, //วันที่รับเรื่อง - CreatedAt = x.CreatedAt,//วันที่สร้างเรื่องสืบสวน - InvestigationDetail = x.InvestigationDetail, - InvestigationStatusResult = x.InvestigationStatusResult, - }); - - bool desc = req.descending ?? false; - if (!string.IsNullOrEmpty(req.sortBy)) - { - switch (req.sortBy) - { - case "title": - query = desc ? query.OrderByDescending(x => x.Title) - : query.OrderBy(x => x.Title); - break; - - case "respondentType": - query = desc ? query.OrderByDescending(x => x.RespondentType) - : query.OrderBy(x => x.RespondentType); - break; - - case "offenseDetails": - query = desc ? query.OrderByDescending(x => x.OffenseDetails) - : query.OrderBy(x => x.OffenseDetails); - break; - - case "status": - query = desc ? query.OrderByDescending(x => x.Status) - : query.OrderBy(x => x.Status); - break; - - case "investigationDateStart": - query = desc ? query.OrderByDescending(x => x.InvestigationDateStart) - : query.OrderBy(x => x.InvestigationDateStart); - break; - - case "investigationDateEnd": - query = desc ? query.OrderByDescending(x => x.InvestigationDateEnd) - : query.OrderBy(x => x.InvestigationDateEnd); - break; - - case "dateReceived": - query = desc ? query.OrderByDescending(x => x.DateReceived) - : query.OrderBy(x => x.DateReceived); - break; - - case "createdAt": - query = desc ? query.OrderByDescending(x => x.CreatedAt) - : query.OrderBy(x => x.CreatedAt); - break; - - case "investigationDetail": - query = desc ? query.OrderByDescending(x => x.InvestigationDetail) - : query.OrderBy(x => x.InvestigationDetail); - break; - - case "investigationStatusResult": - query = desc ? query.OrderByDescending(x => x.InvestigationStatusResult) - : query.OrderBy(x => x.InvestigationStatusResult); - break; - - default: - query = query.OrderByDescending(x => x.InvestigationDateStart); - - break; - } - - } - - var data = query - .Skip((page - 1) * pageSize) - .Take(pageSize) - .ToList(); - - return Success(new { data, total = data_search.Count() }); - } - // /// // /// get รายการวินัยเรื่องร้องเรียน // /// @@ -513,9 +366,6 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers posLevelName = p.posLevelName, IsSend = p.IsReport, - DocumentReject = p.DocumentReject, - disciplineRejectDoc = new List(), - RemarkReject = p.RemarkReject, IsDisciplinary = p.IsDisciplinary, profileType = p.profileType, CreatedAt = p.CreatedAt, @@ -553,23 +403,6 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers }; disciplineInvestigateRelevantDocs.Add(_doc); } - - var persons = new List(); - foreach (var doc in _data.Persons) - { - if (doc.DocumentReject != null) - { - var _doc = new - { - doc.DocumentReject.Id, - doc.DocumentReject.FileName, - PathName = await _documentService.ImagesPath(doc.DocumentReject.Id) - }; - doc.disciplineRejectDoc.Add(_doc); - } - persons.Add(doc); - } - var data = new { _data.Id, @@ -588,7 +421,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers _data.Result, _data.Director, _data.RespondentType, - persons, + _data.Persons, _data.Organization, _data.OrganizationId, disciplineInvestigateDocs, @@ -827,7 +660,6 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers { RespondentType = data.RespondentType.Trim().ToUpper(), Organization = data.Organization, - RootDnaId = data.RootDnaId, ConsideredAgency = data.ConsideredAgency, OrganizationId = data.OrganizationId, ConsideredAgencyId = data.ConsideredAgencyId, @@ -967,7 +799,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = persons.Select(x => x.PersonId), @@ -1333,35 +1165,20 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("report")] // [HttpPut("report/{commandTypeId:length(36)}")] - public async Task> PostToReport([FromForm] DisciplineProfileRequest req) + public async Task> PostToReport([FromBody] DisciplineProfileRequest req) { - foreach (var item in req.id) + foreach (var item in req.Id) { var uppdated = await _context.DisciplineInvestigate_ProfileComplaints .FirstOrDefaultAsync(x => x.Id == item); if (uppdated == null) continue; - uppdated.IsReport = "DONE"; - uppdated.RemarkReject = req.remark; + // uppdated.CommandTypeId = commandTypeId; + uppdated.IsReport = "REPORT"; uppdated.LastUpdateFullName = FullName ?? "System Administrator"; uppdated.LastUpdateUserId = UserId ?? ""; uppdated.LastUpdatedAt = DateTime.Now; - - if (Request.Form.Files != null && Request.Form.Files.Count != 0) - { - foreach (var file in Request.Form.Files) - { - var fileExtension = Path.GetExtension(file.FileName); - var doc = await _documentService.UploadFileAsync(file, file.FileName); - var _doc = await _context.Documents.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == doc.Id); - if (_doc != null) - { - uppdated.DocumentReject = _doc; - } - } - } } await _context.SaveChangesAsync(); diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineReportController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineReportController.cs index 6f7040ee..f819e6a0 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineReportController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineReportController.cs @@ -74,150 +74,36 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } + var profile = new List(); + if (type.Trim().ToUpper() == "OFFICER") + { + profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD"); + } + else + { + profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD"); + } - var data_search1 = await _context.DisciplineComplaints - .Include(x => x.DisciplineComplaint_Profiles) - .Where(x => req.status.Trim().ToUpper() == "ALL" ? true : (x.Status != null && x.Status.Contains(req.status.Trim().ToUpper()))) - .Where(x => req.offenseDetail.Trim().ToUpper() == "ALL" ? true : (x.OffenseDetails != null && x.OffenseDetails.Contains(req.status.Trim().ToUpper()))) - // .Where(x => req.disciplinaryFaultLevel.Trim().ToUpper() == "ALL" ? true : (x.DisciplinaryFaultLevel != null && x.DisciplinaryFaultLevel.Contains(req.status.Trim().ToUpper()))) - .OrderByDescending(x => x.CreatedAt) - .ToListAsync(); + if (req.posLevel != null || req.posType != null) + { + profile = profile.Where(x => x.PositionType == req.posType || x.PositionLevel == req.posLevel).ToList(); + } - var mapData1 = data_search1 - .SelectMany((d) => d.DisciplineComplaint_Profiles.Select((profile) => new - { - fullName = $"{profile.Prefix}{profile.FirstName} {profile.LastName}", - citizenId = profile.CitizenId, - position = profile.Position, - posLevel = profile.posLevelName, - oc = profile.Organization, - CreatedAt = profile.CreatedAt, - offense = d.OffenseDetails != null && d.OffenseDetails != "" - ? d.OffenseDetails == "NOT_SPECIFIED" - ? "ความผิดวินัยยังไม่ระบุ" - : d.OffenseDetails == "NOT_DEADLY" - ? "ความผิดวินัยไม่ร้ายแรง" - : d.OffenseDetails == "DEADLY" - ? "ความผิดวินัยร้ายแรง" - : "" - : "", - faultLevel = "", - Child4Id = profile.child4DnaId, - Child4 = profile.child4, - Child3Id = profile.child3DnaId, - Child3 = profile.child3, - Child2Id = profile.child2DnaId, - Child2 = profile.child2, - Child1Id = profile.child1DnaId, - Child1 = profile.child1, - RootId = profile.rootDnaId, - Root = profile.root, - PosType = profile.posTypeName, - PosLevel = profile.posLevelName - })) - .Where(x => req.node == 4 ? x.Child4Id == req.nodeId : (req.node == 3 ? x.Child3Id == req.nodeId : (req.node == 2 ? x.Child2Id == req.nodeId : (req.node == 1 ? x.Child1Id == req.nodeId : (req.node == 0 ? x.RootId == req.nodeId : (req.node == null ? true : true)))))) - .Where(x => jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD" ? true : (req.node == 0 ? x.Child1Id == null : (req.node == 1 ? x.Child2Id == null : (req.node == 2 ? x.Child3Id == null : (req.node == 3 ? x.Child4Id == null : true))))) - .Where(x => string.IsNullOrEmpty(req.posType) || x.PosType == req.posType) - .Where(x => string.IsNullOrEmpty(req.posLevel) || x.PosLevel == req.posLevel) - .OrderByDescending(x => x.CreatedAt) - .ToList(); - var groupedResult1 = mapData1 - .GroupBy(x => x.fullName) - .Select(g => new - { - one = g.Count(), // Count of records per fullName - two = 0, - three = 0, - g.Where(x => x.fullName != null || x.fullName != "").FirstOrDefault()?.fullName, - g.Where(x => x.citizenId != null || x.citizenId != "").FirstOrDefault()?.citizenId, - g.Where(x => x.position != null || x.position != "").FirstOrDefault()?.position, - g.Where(x => x.posLevel != null || x.posLevel != "").FirstOrDefault()?.posLevel, - oc = (g.Where(x => x.Child4 != null || x.Child4 != "").FirstOrDefault()?.Child4 == null ? "" : g.Where(x => x.Child4 != null || x.Child4 != "").FirstOrDefault()?.Child4 + "\n") + - (g.Where(x => x.Child3 != null || x.Child3 != "").FirstOrDefault()?.Child3 == null ? "" : g.Where(x => x.Child3 != null || x.Child3 != "").FirstOrDefault()?.Child3 + "\n") + - (g.Where(x => x.Child2 != null || x.Child2 != "").FirstOrDefault()?.Child2 == null ? "" : g.Where(x => x.Child2 != null || x.Child2 != "").FirstOrDefault()?.Child2 + "\n") + - (g.Where(x => x.Child1 != null || x.Child1 != "").FirstOrDefault()?.Child1 == null ? "" : g.Where(x => x.Child1 != null || x.Child1 != "").FirstOrDefault()?.Child1 + "\n") + - (g.Where(x => x.Root != null || x.Root != "").FirstOrDefault()?.Root == null ? "" : g.Where(x => x.Root != null || x.Root != "").FirstOrDefault()?.Root), - g.Where(x => x.offense != null || x.offense != "").FirstOrDefault()?.offense, - g.Where(x => x.faultLevel != null || x.faultLevel != "").FirstOrDefault()?.faultLevel, - }) - .ToList(); - - var data_search2 = await _context.DisciplineInvestigates - .Include(x => x.DisciplineInvestigate_ProfileComplaints) - .Where(x => req.status.Trim().ToUpper() == "ALL" ? true : (x.Status != null && x.Status.Contains(req.status.Trim().ToUpper()))) - .Where(x => req.offenseDetail.Trim().ToUpper() == "ALL" ? true : (x.OffenseDetails != null && x.OffenseDetails.Contains(req.status.Trim().ToUpper()))) - // .Where(x => req.disciplinaryFaultLevel.Trim().ToUpper() == "ALL" ? true : (x.DisciplinaryFaultLevel != null && x.DisciplinaryFaultLevel.Contains(req.status.Trim().ToUpper()))) - .OrderByDescending(x => x.CreatedAt) - .ToListAsync(); - - var mapData2 = data_search2 - .SelectMany((d) => d.DisciplineInvestigate_ProfileComplaints.Select((profile) => new - { - fullName = $"{profile.Prefix}{profile.FirstName} {profile.LastName}", - citizenId = profile.CitizenId, - position = profile.Position, - posLevel = profile.posLevelName, - oc = profile.Organization, - CreatedAt = profile.CreatedAt, - offense = d.OffenseDetails != null && d.OffenseDetails != "" - ? d.OffenseDetails == "NOT_SPECIFIED" - ? "ความผิดวินัยยังไม่ระบุ" - : d.OffenseDetails == "NOT_DEADLY" - ? "ความผิดวินัยไม่ร้ายแรง" - : d.OffenseDetails == "DEADLY" - ? "ความผิดวินัยร้ายแรง" - : "" - : "", - faultLevel = "", - Child4Id = profile.child4DnaId, - Child4 = profile.child4, - Child3Id = profile.child3DnaId, - Child3 = profile.child3, - Child2Id = profile.child2DnaId, - Child2 = profile.child2, - Child1Id = profile.child1DnaId, - Child1 = profile.child1, - RootId = profile.rootDnaId, - Root = profile.root, - PosType = profile.posTypeName, - PosLevel = profile.posLevelName - })) - .Where(x => req.node == 4 ? x.Child4Id == req.nodeId : (req.node == 3 ? x.Child3Id == req.nodeId : (req.node == 2 ? x.Child2Id == req.nodeId : (req.node == 1 ? x.Child1Id == req.nodeId : (req.node == 0 ? x.RootId == req.nodeId : (req.node == null ? true : true)))))) - .Where(x => jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD" ? true : (req.node == 0 ? x.Child1Id == null : (req.node == 1 ? x.Child2Id == null : (req.node == 2 ? x.Child3Id == null : (req.node == 3 ? x.Child4Id == null : true))))) - .Where(x => string.IsNullOrEmpty(req.posType) || x.PosType == req.posType) - .Where(x => string.IsNullOrEmpty(req.posLevel) || x.PosLevel == req.posLevel) - .OrderByDescending(x => x.CreatedAt) - .ToList(); - var groupedResult2 = mapData2 - .GroupBy(x => x.fullName) - .Select(g => new - { - one = 0, - two = g.Count(), // Count of records per fullName - three = 0, - g.Where(x => x.fullName != null || x.fullName != "").FirstOrDefault()?.fullName, - g.Where(x => x.citizenId != null || x.citizenId != "").FirstOrDefault()?.citizenId, - g.Where(x => x.position != null || x.position != "").FirstOrDefault()?.position, - g.Where(x => x.posLevel != null || x.posLevel != "").FirstOrDefault()?.posLevel, - oc = (g.Where(x => x.Child4 != null || x.Child4 != "").FirstOrDefault()?.Child4 == null ? "" : g.Where(x => x.Child4 != null || x.Child4 != "").FirstOrDefault()?.Child4 + "\n") + - (g.Where(x => x.Child3 != null || x.Child3 != "").FirstOrDefault()?.Child3 == null ? "" : g.Where(x => x.Child3 != null || x.Child3 != "").FirstOrDefault()?.Child3 + "\n") + - (g.Where(x => x.Child2 != null || x.Child2 != "").FirstOrDefault()?.Child2 == null ? "" : g.Where(x => x.Child2 != null || x.Child2 != "").FirstOrDefault()?.Child2 + "\n") + - (g.Where(x => x.Child1 != null || x.Child1 != "").FirstOrDefault()?.Child1 == null ? "" : g.Where(x => x.Child1 != null || x.Child1 != "").FirstOrDefault()?.Child1 + "\n") + - (g.Where(x => x.Root != null || x.Root != "").FirstOrDefault()?.Root == null ? "" : g.Where(x => x.Root != null || x.Root != "").FirstOrDefault()?.Root), - g.Where(x => x.offense != null || x.offense != "").FirstOrDefault()?.offense, - g.Where(x => x.faultLevel != null || x.faultLevel != "").FirstOrDefault()?.faultLevel, - }) - .ToList(); - - var data_search3 = await _context.DisciplineDisciplinarys + var data_search = await _context.DisciplineDisciplinarys .Include(x => x.DisciplineDisciplinary_ProfileComplaintInvestigates) - .Where(x => req.status.Trim().ToUpper() == "ALL" ? true : (x.Status != null && x.Status.Contains(req.status.Trim().ToUpper()))) - .Where(x => req.offenseDetail.Trim().ToUpper() == "ALL" ? true : (x.OffenseDetails != null && x.OffenseDetails.Contains(req.status.Trim().ToUpper()))) - .Where(x => req.disciplinaryFaultLevel.Trim().ToUpper() == "ALL" ? true : (x.DisciplinaryFaultLevel != null && x.DisciplinaryFaultLevel.Contains(req.status.Trim().ToUpper()))) .OrderByDescending(x => x.CreatedAt) .ToListAsync(); - var mapData3 = data_search3 + if (req.status.Trim().ToUpper() != "ALL") + data_search = data_search.Where(x => x.Status != null && x.Status.Contains(req.status.Trim().ToUpper())).ToList(); + + if (req.offenseDetail.Trim().ToUpper() != "ALL") + data_search = data_search.Where(x => x.OffenseDetails != null && x.OffenseDetails.Contains(req.status.Trim().ToUpper())).ToList(); + + if (req.disciplinaryFaultLevel.Trim().ToUpper() != "ALL") + data_search = data_search.Where(x => x.DisciplinaryFaultLevel != null && x.DisciplinaryFaultLevel.Contains(req.status.Trim().ToUpper())).ToList(); + + var mapData = data_search .SelectMany((d) => d.DisciplineDisciplinary_ProfileComplaintInvestigates.Select((profile) => new { fullName = $"{profile.Prefix}{profile.FirstName} {profile.LastName}", @@ -236,68 +122,15 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers : "" : "", faultLevel = d.DisciplinaryFaultLevel, - Child4Id = profile.child4DnaId, - Child4 = profile.child4, - Child3Id = profile.child3DnaId, - Child3 = profile.child3, - Child2Id = profile.child2DnaId, - Child2 = profile.child2, - Child1Id = profile.child1DnaId, - Child1 = profile.child1, - RootId = profile.rootDnaId, - Root = profile.root, - PosType = profile.posTypeName, - PosLevel = profile.posLevelName })) - .Where(x => req.node == 4 ? x.Child4Id == req.nodeId : (req.node == 3 ? x.Child3Id == req.nodeId : (req.node == 2 ? x.Child2Id == req.nodeId : (req.node == 1 ? x.Child1Id == req.nodeId : (req.node == 0 ? x.RootId == req.nodeId : (req.node == null ? true : true)))))) - .Where(x => jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD" ? true : (req.node == 0 ? x.Child1Id == null : (req.node == 1 ? x.Child2Id == null : (req.node == 2 ? x.Child3Id == null : (req.node == 3 ? x.Child4Id == null : true))))) - .Where(x => string.IsNullOrEmpty(req.posType) || x.PosType == req.posType) - .Where(x => string.IsNullOrEmpty(req.posLevel) || x.PosLevel == req.posLevel) + .Where(x => + x.citizenId != null && profile.Any(p => p.CitizenId == x.citizenId)) .OrderByDescending(x => x.CreatedAt) .ToList(); - var groupedResult3 = mapData3 - .GroupBy(x => x.fullName) - .Select(g => new - { - one = 0, - two = 0, - three = g.Count(), // Count of records per fullName - g.Where(x => x.fullName != null || x.fullName != "").FirstOrDefault()?.fullName, - g.Where(x => x.citizenId != null || x.citizenId != "").FirstOrDefault()?.citizenId, - g.Where(x => x.position != null || x.position != "").FirstOrDefault()?.position, - g.Where(x => x.posLevel != null || x.posLevel != "").FirstOrDefault()?.posLevel, - oc = (g.Where(x => x.Child4 != null || x.Child4 != "").FirstOrDefault()?.Child4 == null ? "" : g.Where(x => x.Child4 != null || x.Child4 != "").FirstOrDefault()?.Child4 + "\n") + - (g.Where(x => x.Child3 != null || x.Child3 != "").FirstOrDefault()?.Child3 == null ? "" : g.Where(x => x.Child3 != null || x.Child3 != "").FirstOrDefault()?.Child3 + "\n") + - (g.Where(x => x.Child2 != null || x.Child2 != "").FirstOrDefault()?.Child2 == null ? "" : g.Where(x => x.Child2 != null || x.Child2 != "").FirstOrDefault()?.Child2 + "\n") + - (g.Where(x => x.Child1 != null || x.Child1 != "").FirstOrDefault()?.Child1 == null ? "" : g.Where(x => x.Child1 != null || x.Child1 != "").FirstOrDefault()?.Child1 + "\n") + - (g.Where(x => x.Root != null || x.Root != "").FirstOrDefault()?.Root == null ? "" : g.Where(x => x.Root != null || x.Root != "").FirstOrDefault()?.Root), - g.Where(x => x.offense != null || x.offense != "").FirstOrDefault()?.offense, - g.Where(x => x.faultLevel != null || x.faultLevel != "").FirstOrDefault()?.faultLevel, - }) - .ToList(); - var resultSum = groupedResult1.Concat(groupedResult2).Concat(groupedResult3).ToArray(); - var groupedResult = resultSum - .GroupBy(x => x.fullName) - .Select(g => new - { - // g.Where(x => x.no != null || x.no != "").FirstOrDefault()?.no, - g.Where(x => x.fullName != null || x.fullName != "").FirstOrDefault()?.fullName, - g.Where(x => x.citizenId != null || x.citizenId != "").FirstOrDefault()?.citizenId, - g.Where(x => x.position != null || x.position != "").FirstOrDefault()?.position, - g.Where(x => x.posLevel != null || x.posLevel != "").FirstOrDefault()?.posLevel, - g.Where(x => x.oc != null || x.oc != "").FirstOrDefault()?.oc, - g.Where(x => x.offense != null || x.offense != "").FirstOrDefault()?.offense, - g.Where(x => x.faultLevel != null || x.faultLevel != "").FirstOrDefault()?.faultLevel, - one = g.Sum(x => x.one), // Replace `score` with actual field name - two = g.Sum(x => x.two), // Replace `score` with actual field name - three = g.Sum(x => x.three), // Replace `score` with actual field name - }) - .OrderBy(x => x.citizenId) - .ToList(); - var resultMap = new List(); var count = 1; - foreach (var p in groupedResult) + var employees = new List(); + foreach (var p in mapData) { var emp = new { @@ -306,16 +139,17 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers citizenId = p.citizenId, position = p.position, posLevel = p.posLevel, - oc = p.oc, + oc = profile.FirstOrDefault(x => x.CitizenId == p.citizenId)?.Oc ?? "", offense = p.offense, faultLevel = p.faultLevel, - one = p.one, - two = p.two, - three = p.three, + one = 0, + two = 0, + three = 0, }; - resultMap.Add(emp); + employees.Add(emp); count++; } + var result = new { template = "reportDiscipline", @@ -324,7 +158,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers { year = (req.year + 543).ToString().ToThaiNumber(), dateCurrent = $"ณ วันที่ {DateTime.Now.Date.ToThaiShortDate().ToThaiNumber()}", - data = resultMap + data = employees } }; return Success(result); diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index f6697c2e..1b8ae559 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -120,182 +120,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers return Success(new { data, total = data_search.Count() }); } - /// - /// list รายการสรุปผลการพิจารณาทางวินัย (ค้นหาขั้นสูง) - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("advance-search")] - public async Task> GetAdvanceSearcDisciplineResult([FromBody] DisciplineResultAdvanceSearcRequest req) - { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_RESULT"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - - var page = req.page <= 0 ? 1 : req.page; - var pageSize = req.pageSize <= 0 ? 25 : req.pageSize; - var keyword = string.IsNullOrEmpty(req.keyword) ? string.Empty : req.keyword; - var status = string.IsNullOrEmpty(req.status) ? string.Empty : req.status; - - var data_search = await _context.DisciplineDisciplinarys.AsQueryable() - .Where(x => x.Title.Contains(keyword) || - (x.ResultOc == null ? false : x.ResultOc.Contains(keyword)) || - (x.ResultDisciplineType == null ? false : x.ResultDisciplineType.Contains(keyword)) || - (x.ResultTitleType == null ? false : x.ResultTitleType.Contains(keyword)) || - (x.ResultYear == null ? false : (x.ResultYear + 543).ToString().Contains(keyword))) - .Where(x => x.Status.Contains("DONE") || x.Status.Contains("REPORT")) - .ToListAsync(); - if (status.Trim().ToUpper() != "ALL") - data_search = data_search.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); - - if ( - (req.disciplinaryDateStart.HasValue && req.disciplinaryDateEnd.HasValue) || - (!string.IsNullOrEmpty(req.respondentType)) || - (!string.IsNullOrEmpty(req.offenseDetails)) || - (!string.IsNullOrEmpty(req.disciplinaryFaultLevel)) || - (!string.IsNullOrEmpty(req.disciplinaryCaseFault)) || - (!string.IsNullOrEmpty(req.resultDisciplineType)) || - (!string.IsNullOrEmpty(req.resultTitleType)) || - (!string.IsNullOrEmpty(req.resultOc)) || - (req.resultYear.HasValue) - ) - { - data_search = data_search - .Where(x => - (!req.disciplinaryDateStart.HasValue || !req.disciplinaryDateEnd.HasValue || - (x.DisciplinaryDateStart.HasValue && x.DisciplinaryDateEnd.HasValue && - x.DisciplinaryDateStart.Value.Date <= req.disciplinaryDateStart.Value.Date && - x.DisciplinaryDateEnd.Value.Date >= req.disciplinaryDateEnd.Value.Date)) - && - (string.IsNullOrEmpty(req.respondentType) || x.RespondentType == req.respondentType) - && - (string.IsNullOrEmpty(req.offenseDetails) || x.OffenseDetails == req.offenseDetails) - && - (string.IsNullOrEmpty(req.disciplinaryFaultLevel) || x.DisciplinaryFaultLevel == req.disciplinaryFaultLevel) - && - (string.IsNullOrEmpty(req.disciplinaryCaseFault) || (x.DisciplinaryCaseFault?.Contains(req.disciplinaryCaseFault) ?? false)) - && - (string.IsNullOrEmpty(req.resultDisciplineType) || (x.ResultDisciplineType?.Contains(req.resultDisciplineType) ?? false)) - && - (string.IsNullOrEmpty(req.resultTitleType) || (x.ResultTitleType?.Contains(req.resultTitleType) ?? false)) - && - (string.IsNullOrEmpty(req.resultOc) || (x.ResultOc?.Contains(req.resultOc) ?? false)) - && - (!req.resultYear.HasValue || x.ResultYear == req.resultYear) - ) - .ToList(); - } - - var query = data_search - .Select(x => new - { - Id = x.Id,//id ข้อมูลเรื่องสอบสวน - Title = x.Title,//ชื่อเรื่อง - RespondentType = x.RespondentType,//ผู้ถูกสืบสวน - OffenseDetails = x.OffenseDetails,//ลักษณะความผิด - DisciplinaryFaultLevel = x.DisciplinaryFaultLevel,//ระดับโทษความผิด - DisciplinaryCaseFault = x.DisciplinaryCaseFault,//กรณีความผิด - Status = x.Status,//สถานะหรือผลการสอบสวน - CreatedAt = x.CreatedAt,//วันที่สร้างเรื่องสอบสวน - DisciplinaryDateStart = x.DisciplinaryDateStart, //วันที่เริ่มการสอบสวน - DisciplinaryDateEnd = x.DisciplinaryDateEnd, //วันที่สิ้นสุดการสอบสวน - ResultOc = x.ResultOc,//หน่วยงาย/ส่วนราชการ - ResultDisciplineType = x.ResultDisciplineType,//หน่วยงาย/ส่วนราชการ - ResultTitleType = x.ResultTitleType,//ประเภทของเรื่อง - ResultYear = x.ResultYear,//ปีงบประมาณ - }); - - bool desc = req.descending ?? false; - if (!string.IsNullOrEmpty(req.sortBy)) - { - switch (req.sortBy) - { - case "title": - query = desc ? query.OrderByDescending(x => x.Title) - : query.OrderBy(x => x.Title); - break; - - case "respondentType": - query = desc ? query.OrderByDescending(x => x.RespondentType) - : query.OrderBy(x => x.RespondentType); - break; - - case "offenseDetails": - query = desc ? query.OrderByDescending(x => x.OffenseDetails) - : query.OrderBy(x => x.OffenseDetails); - break; - - case "disciplinaryFaultLevel": - query = desc ? query.OrderByDescending(x => x.DisciplinaryFaultLevel) - : query.OrderBy(x => x.DisciplinaryFaultLevel); - break; - - case "disciplinaryCaseFault": - query = desc ? query.OrderByDescending(x => x.DisciplinaryCaseFault) - : query.OrderBy(x => x.DisciplinaryCaseFault); - break; - - case "status": - query = desc ? query.OrderByDescending(x => x.Status) - : query.OrderBy(x => x.Status); - break; - - case "createdAt": - query = desc ? query.OrderByDescending(x => x.CreatedAt) - : query.OrderBy(x => x.CreatedAt); - break; - - case "disciplinaryDateStart": - query = desc ? query.OrderByDescending(x => x.DisciplinaryDateStart) - : query.OrderBy(x => x.DisciplinaryDateStart); - break; - - case "disciplinaryDateEnd": - query = desc ? query.OrderByDescending(x => x.DisciplinaryDateEnd) - : query.OrderBy(x => x.DisciplinaryDateEnd); - break; - - case "resultOc": - query = desc ? query.OrderByDescending(x => x.ResultOc) - : query.OrderBy(x => x.ResultOc); - break; - - case "resultDisciplineType": - query = desc ? query.OrderByDescending(x => x.ResultDisciplineType) - : query.OrderBy(x => x.ResultDisciplineType); - break; - - case "resultTitleType": - query = desc ? query.OrderByDescending(x => x.ResultTitleType) - : query.OrderBy(x => x.ResultTitleType); - break; - - case "resultYear": - query = desc ? query.OrderByDescending(x => x.ResultYear) - : query.OrderBy(x => x.ResultYear); - break; - - default: - query = query.OrderByDescending(x => x.CreatedAt); - break; - } - - } - - var data = query - .Skip((page - 1) * pageSize) - .Take(pageSize) - .ToList(); - - return Success(new { data, total = data_search.Count() }); - } - /// /// get รายการสรุปผลการพิจารณาทางวินัย /// @@ -370,8 +194,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers Status = p.Status, StatusDiscard = p.StatusDiscard, profileType = p.profileType, - Remark = p.Remark, - Offense = p.Offense, CreatedAt = p.CreatedAt }),//รายการข้อมูลบุคลผู้ถูกสืบสวน Organization = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน @@ -708,7 +530,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlDiscipline); var _res = await client.PostAsJsonAsync(apiUrlDiscipline, new { @@ -755,7 +577,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlDiscipline); var _res = await client.PostAsJsonAsync(apiUrlDiscipline, new { @@ -801,7 +623,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlDiscipline); var _res = await client.PostAsJsonAsync(apiUrlDiscipline, new { @@ -829,7 +651,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlDiscipline); var _res = await client.PostAsJsonAsync(apiUrlDiscipline, new { @@ -875,7 +697,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlDiscipline); var _res = await client.PostAsJsonAsync(apiUrlDiscipline, new { @@ -933,32 +755,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers return Success(data1); } - /// - /// ประวัติการออกคำสั่ง - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("order/history/{personId}")] - public async Task> GetOrderHistoryDiscipline(string personId) - { - var data = await _context.ProfileComplaintInvestigate - .Where(x => x.PersonId == personId) - .OrderByDescending(x => x.CreatedAt) - .ToListAsync(); - var result = data - .Select((x, idx) => new - { - no = (idx + 1).ToString(), - commandSubject = x.commandType, - createdAt = x.CreatedAt - }) - .ToList(); - return Success(result); - } - /// /// ส่งรายชื่อออกคำสั่ง C-PM-19 /// @@ -968,20 +764,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command19/report")] - public async Task> PostReportCommand19([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand19([FromBody] ReportPersonRequest req) { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1001,13 +789,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -1027,7 +809,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1054,104 +835,53 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // // คำสั่งไล่ออก หรือ ปลดออก Status หลังออกคำสั่งใช้ "REPORTED" เพื่อไม่ให้ส่งรายชื่อไปออกคำสั่งซ้ำได้ - // data.ForEach(profile => { profile.Status = "REPORTED"; profile.CommandTypeId = null; }); - // var _profile = new List(); - // DateTime _date = DateTime.Now; - // foreach (var item in data) - // { - // _profile.Add(new ProfileComplaintInvestigate - // { - // PersonId = item.PersonId, - // Prefix = item.Prefix, - // FirstName = item.FirstName, - // LastName = item.LastName, - // CitizenId = item.CitizenId, - // rootDnaId = item.rootDnaId, - // child1DnaId = item.child1DnaId, - // child2DnaId = item.child2DnaId, - // child3DnaId = item.child3DnaId, - // child4DnaId = item.child4DnaId, - // profileType = item.profileType, - // commandType = "C-PM-19", - // CreatedAt = _date, - // CreatedUserId = UserId, - // CreatedFullName = FullName, - // LastUpdatedAt = _date, - // LastUpdateUserId = UserId, - // LastUpdateFullName = FullName, - // }); - // } - // _context.ProfileComplaintInvestigate.AddRange(_profile); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + using (var client = new HttpClient()) { - profile.Status = "REPORTED"; - profile.CommandTypeId = null; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - - var _profile = new List(); - foreach (var item in data) - { - _profile.Add(new ProfileComplaintInvestigate + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new { - PersonId = item.PersonId, - Prefix = item.Prefix, - FirstName = item.FirstName, - LastName = item.LastName, - CitizenId = item.CitizenId, - rootDnaId = item.rootDnaId, - child1DnaId = item.child1DnaId, - child2DnaId = item.child2DnaId, - child3DnaId = item.child3DnaId, - child4DnaId = item.child4DnaId, - profileType = item.profileType, - commandType = "C-PM-19", - CreatedAt = now, - CreatedUserId = UserId ?? "", - CreatedFullName = FullName ?? "System Administrator", - LastUpdatedAt = now, - LastUpdateUserId = UserId ?? "", - LastUpdateFullName = FullName ?? "System Administrator", + data = resultData, }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + var _profile = new List(); + DateTime _date = DateTime.Now; + foreach (var item in data) + { + _profile.Add(new ProfileComplaintInvestigate + { + PersonId = item.PersonId, + Prefix = item.Prefix, + FirstName = item.FirstName, + LastName = item.LastName, + CitizenId = item.CitizenId, + rootDnaId = item.rootDnaId, + child1DnaId = item.child1DnaId, + child2DnaId = item.child2DnaId, + child3DnaId = item.child3DnaId, + child4DnaId = item.child4DnaId, + profileType = item.profileType, + commandType = "C-PM-19", + CreatedAt = _date, + CreatedUserId = UserId, + CreatedFullName = FullName, + LastUpdatedAt = _date, + LastUpdateUserId = UserId, + LastUpdateFullName = FullName, + }); + } + _context.ProfileComplaintInvestigate.AddRange(_profile); + await _context.SaveChangesAsync(); + } } - _context.ProfileComplaintInvestigate.AddRange(_profile); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + return Success(); } /// @@ -1163,20 +893,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command20/report")] - public async Task> PostReportcommand20([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportcommand20([FromBody] ReportPersonRequest req) { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1196,13 +918,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -1222,7 +938,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1249,104 +964,53 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // // คำสั่งไล่ออก หรือ ปลดออก Status หลังออกคำสั่งใช้ "REPORTED" เพื่อไม่ให้ส่งรายชื่อไปออกคำสั่งซ้ำได้ - // data.ForEach(profile => { profile.Status = "REPORTED"; profile.CommandTypeId = null; }); - // var _profile = new List(); - // DateTime _date = DateTime.Now; - // foreach (var item in data) - // { - // _profile.Add(new ProfileComplaintInvestigate - // { - // PersonId = item.PersonId, - // Prefix = item.Prefix, - // FirstName = item.FirstName, - // LastName = item.LastName, - // CitizenId = item.CitizenId, - // rootDnaId = item.rootDnaId, - // child1DnaId = item.child1DnaId, - // child2DnaId = item.child2DnaId, - // child3DnaId = item.child3DnaId, - // child4DnaId = item.child4DnaId, - // profileType = item.profileType, - // commandType = "C-PM-20", - // CreatedAt = _date, - // CreatedUserId = UserId, - // CreatedFullName = FullName, - // LastUpdatedAt = _date, - // LastUpdateUserId = UserId, - // LastUpdateFullName = FullName, - // }); - // } - // _context.ProfileComplaintInvestigate.AddRange(_profile); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + using (var client = new HttpClient()) { - profile.Status = "REPORTED"; - profile.CommandTypeId = null; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - - var _profile = new List(); - foreach (var item in data) - { - _profile.Add(new ProfileComplaintInvestigate + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new { - PersonId = item.PersonId, - Prefix = item.Prefix, - FirstName = item.FirstName, - LastName = item.LastName, - CitizenId = item.CitizenId, - rootDnaId = item.rootDnaId, - child1DnaId = item.child1DnaId, - child2DnaId = item.child2DnaId, - child3DnaId = item.child3DnaId, - child4DnaId = item.child4DnaId, - profileType = item.profileType, - commandType = "C-PM-20", - CreatedAt = now, - CreatedUserId = UserId ?? "", - CreatedFullName = FullName ?? "System Administrator", - LastUpdatedAt = now, - LastUpdateUserId = UserId ?? "", - LastUpdateFullName = FullName ?? "System Administrator", + data = resultData, }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + var _profile = new List(); + DateTime _date = DateTime.Now; + foreach (var item in data) + { + _profile.Add(new ProfileComplaintInvestigate + { + PersonId = item.PersonId, + Prefix = item.Prefix, + FirstName = item.FirstName, + LastName = item.LastName, + CitizenId = item.CitizenId, + rootDnaId = item.rootDnaId, + child1DnaId = item.child1DnaId, + child2DnaId = item.child2DnaId, + child3DnaId = item.child3DnaId, + child4DnaId = item.child4DnaId, + profileType = item.profileType, + commandType = "C-PM-20", + CreatedAt = _date, + CreatedUserId = UserId, + CreatedFullName = FullName, + LastUpdatedAt = _date, + LastUpdateUserId = UserId, + LastUpdateFullName = FullName, + }); + } + _context.ProfileComplaintInvestigate.AddRange(_profile); + await _context.SaveChangesAsync(); + } } - _context.ProfileComplaintInvestigate.AddRange(_profile); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + return Success(); } /// @@ -1358,22 +1022,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command25/report")] - public async Task> PostReportCommand25([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand25([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineReport_Profiles .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1400,13 +1056,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "PENDING"); - data.ForEach(profile => - { - profile.Status = "PENDING"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "PENDING"); await _context.SaveChangesAsync(); return Success(); } @@ -1495,7 +1145,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers // .Where(x => x.Status == "REPORT") .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1522,48 +1171,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.Status = "DONE"); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -1575,22 +1202,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command26/report")] - public async Task> PostReportCommand26([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand26([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineReport_Profiles .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1617,13 +1236,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "PENDING"); - data.ForEach(profile => - { - profile.Status = "PENDING"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "PENDING"); await _context.SaveChangesAsync(); return Success(); } @@ -1650,7 +1263,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers // .Where(x => x.Status == "REPORT") .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1677,48 +1289,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.Status = "DONE"); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -1730,22 +1320,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command27/report")] - public async Task> PostReportCommand27([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand27([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1772,13 +1354,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -1803,7 +1379,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -1830,49 +1405,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + using (var client = new HttpClient()) { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -1884,22 +1436,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command28/report")] - public async Task> PostReportCommand28([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand28([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -1926,13 +1470,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -1957,7 +1495,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -1984,49 +1521,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + using (var client = new HttpClient()) { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -2038,22 +1552,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command29/report")] - public async Task> PostReportCommand29([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand29([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -2080,13 +1586,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -2111,7 +1611,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -2138,49 +1637,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + using (var client = new HttpClient()) { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -2192,22 +1668,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command30/report")] - public async Task> PostReportCommand30([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand30([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -2234,13 +1702,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -2265,7 +1727,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -2292,49 +1753,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + using (var client = new HttpClient()) { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -2346,22 +1784,14 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command31/report")] - public async Task> PostReportCommand31([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand31([FromBody] ReportPersonRequest req) { try { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - data.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); } @@ -2388,13 +1818,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); - // data.ForEach(profile => profile.Status = "NEW"); - data.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data.ForEach(profile => profile.Status = "NEW"); await _context.SaveChangesAsync(); return Success(); } @@ -2419,7 +1843,6 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Include(x => x.DisciplineDisciplinary) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -2446,49 +1869,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + using (var client = new HttpClient()) { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => { profile.Status = "NEW"; profile.CommandTypeId = null; }); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -2500,7 +1900,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpPost("command32/report")] - public async Task> PostReportCommand32([FromBody] ReportPersonAndCommandRequest req) + public async Task> PostReportCommand32([FromBody] ReportPersonRequest req) { try { @@ -2513,15 +1913,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); - // data2.ForEach(profile => profile.IsReport = req.status.Trim().ToUpper()); - data2.ForEach(profile => - { - profile.Status = !string.IsNullOrEmpty(req.status) - ? req.status.Trim().ToUpper() : null; - profile.CommandTypeId = !string.IsNullOrEmpty(req.commandTypeId) && Guid.TryParse(req.commandTypeId, out var cmdTypeId) - ? cmdTypeId : null; - profile.CommandCode = req.commandCode ?? null; - }); + data2.ForEach(profile => profile.IsReport = req.status.Trim().ToUpper()); await _context.SaveChangesAsync(); return Success(); @@ -2556,13 +1948,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers // .Where(x => x.IsReport == "REPORT") .ToListAsync(); - // data2.ForEach(profile => profile.IsReport = "NEW"); - data2.ForEach(profile => - { - profile.Status = "NEW"; - profile.CommandTypeId = null; - profile.CommandCode = null; - }); + data2.ForEach(profile => profile.IsReport = "NEW"); await _context.SaveChangesAsync(); return Success(); @@ -2584,22 +1970,11 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers [HttpPost("command32/report/excecute")] public async Task> PostReportCommand32Execute([FromBody] ReportExecuteRequest req) { - // C-PM-32 (คำสั่งยุติเรื่อง) ต้องยุติงานใน 2 track ที่เก็บอยู่คนละตาราง: - // - data / resultData = ฝั่ง "การสอบสวน" (DisciplineInvestigate_ProfileComplaint) - // - data1 / resultData1 = ฝั่ง "การพิจารณาลงโทษ" (DisciplineDisciplinary_ProfileComplaintInvestigate) - // บุคคลเดียวกัน (profileId เดียวกัน) อาจอยู่ในทั้ง 2 track จึงต้องส่งให้ org แยก 2 ครั้ง (ห้าม merge รวมครั้งเดียว) var data = await _context.DisciplineInvestigate_ProfileComplaints .Include(x => x.DisciplineInvestigate) // .Where(x => x.IsReport == "REPORT") .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - var data1 = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates - .Include(x => x.DisciplineDisciplinary) - // .Where(x => x.IsReport == "REPORT") - .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) - .ToListAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -2626,15 +2001,30 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + using (var client = new HttpClient()) + { + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.IsReport = "DONE"); + await _context.SaveChangesAsync(); + } + } + var data1 = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates + .Include(x => x.DisciplineDisciplinary) + // .Where(x => x.IsReport == "REPORT") + .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) + .ToListAsync(); var resultData1 = (from p in data1 join r in req.refIds on p.Id.ToString() equals r.refId @@ -2660,107 +2050,25 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - posNo = p.posMasterNo != null ? p.posMasterNo.ToString() : null, - posNoAbb = p.child4ShortName != null ? p.child4ShortName : (p.child3ShortName != null ? p.child3ShortName : (p.child2ShortName != null ? p.child2ShortName : (p.child1ShortName != null ? p.child1ShortName : (p.rootShortName != null ? p.rootShortName : "")))), }).ToList(); - - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.IsReport = "DONE"); - // await _context.SaveChangesAsync(); - // } - // } - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData1, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data1.ForEach(profile => profile.IsReport = "DONE"); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + using (var client = new HttpClient()) { - profile.IsReport = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - data1.ForEach(profile => - { - profile.IsReport = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - // - // NOTE สำหรับฝั่ง Node (C-PM-32 เท่านั้น): - // - response.result เป็น object { data, data1 } (ไม่ใช่ array เหมือนคำสั่งอื่น) - // data = รายการฝั่ง "การสอบสวน" → ยิง POST {API}/org/command/excexute/salary-leave-discipline ครั้งที่ 1 - // data1 = รายการฝั่ง "การพิจารณาลงโทษ" → ยิง POST {API}/org/command/excexute/salary-leave-discipline ครั้งที่ 2 - // - ต้องยิง 2 ครั้งตามลำดับ data ก่อน → data1 (ห้าม merge รวมในครั้งเดียว เพราะ profileId อาจซ้ำข้าม 2 track) - // - คำสั่งอื่น (C-PM-19/20/25/26/27/28/29/30/31) response.result เป็น array → ยิง org 1 ครั้ง - return Success(new { data = resultData, data1 = resultData1 }); - } - - /// - /// แก้ไขฐานความผิดรายบุคคล - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("summary/{id:guid}")] - public async Task> UpdateSummaryDisciplineResult([FromBody] DisciplineResultSummaryRequest req, Guid id) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_DISCIPLINE_RESULT"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData1, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data1.ForEach(profile => profile.IsReport = "DONE"); + await _context.SaveChangesAsync(); + } } - var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates.Where(x => x.Id == id).FirstOrDefaultAsync(); - if (data == null) - return Error(new Exception(GlobalMessages.DataNotFound), (int)StatusCodes.Status404NotFound); - data.Remark = req.remark; - data.Offense = req.offense; - data.LastUpdateFullName = FullName ?? "System Administrator"; - data.LastUpdateUserId = UserId ?? ""; - data.LastUpdatedAt = DateTime.Now; - await _context.SaveChangesAsync(); - return Success(data.Id); + + return Success(); } } } diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs index 3e171f9b..a3ac490d 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs @@ -1,21 +1,17 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Discipline.Service.Requests; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Models.Discipline; using BMA.EHR.Domain.Shared; using BMA.EHR.Infrastructure.Persistence; -using Elasticsearch.Net; - // using BMA.EHR.Placement.Service.Requests; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Newtonsoft.Json; using Swashbuckle.AspNetCore.Annotations; -using System.Linq; using System.Security.Claims; namespace BMA.EHR.DisciplineSuspend.Service.Controllers @@ -32,25 +28,24 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers private readonly MinIODisciplineService _documentService; private readonly IHttpContextAccessor _httpContextAccessor; private readonly PermissionRepository _permission; - private readonly UserProfileRepository _userProfileRepository; + public DisciplineSuspendController(DisciplineDbContext context, MinIODisciplineService documentService, IHttpContextAccessor httpContextAccessor, - PermissionRepository permission, - UserProfileRepository userProfileRepository) + PermissionRepository permission) { // _repository = repository; _context = context; _documentService = documentService; _httpContextAccessor = httpContextAccessor; _permission = permission; - _userProfileRepository = userProfileRepository; } #region " Properties " + private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value; + private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -63,7 +58,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpGet()] - public async Task> GetDisciplineSuspend(DateTime? startDate, DateTime? endDate, int page = 1, int pageSize = 25, string keyword = "", string profileType = "", string? sortBy = "", bool? descending = false, string? status="") + public async Task> GetDisciplineSuspend(int page = 1, int pageSize = 25, string keyword = "", string profileType = "") { var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_SUSPENDED"); var jsonData = JsonConvert.DeserializeObject(getPermission); @@ -71,60 +66,8 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - - // ถ้า FE ส่ง status = PENDING กรอง start/end suspend not null - bool isPending = - !string.IsNullOrEmpty(profileType) && - !string.IsNullOrEmpty(status) && - status.Trim().ToUpper() == "PENDING"; - - // กรองสิทธิ์ - string role = jsonData["result"]?.ToString() ?? ""; - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } var data_search = (from x in _context.DisciplineReport_Profiles.Include(x => x.DisciplineDisciplinary) where - ( - endDate != null && startDate != null ? - ( - (x.StartDateSuspend.Value.Date >= startDate.Value.Date && x.StartDateSuspend.Value.Date <= endDate.Value.Date) || - (x.EndDateSuspend.Value.Date >= startDate.Value.Date && x.EndDateSuspend.Value.Date <= endDate.Value.Date) || - (x.StartDateSuspend.Value.Date <= startDate.Value.Date && x.EndDateSuspend.Value.Date >= endDate.Value.Date) - ) : - true - ) - && ( (x.CitizenId != null && x.CitizenId.Contains(keyword)) || ((x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) || @@ -140,169 +83,65 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers (profileType.ToUpper() == "OFFICER" && x.profileType == "OFFICER") || (profileType.ToUpper() == "EMPLOYEE" && x.profileType == "EMPLOYEE") ) - && - ( - !string.IsNullOrEmpty(status) ? x.Status!.Trim().ToUpper() == status : true - ) - // ถ้า FE ส่ง status = PENDING กรอง start/end suspend not null - && - ( - isPending - ? x.StartDateSuspend != null && x.EndDateSuspend != null - : true - ) - && - ( - role == "OWNER" - ? true - : role == "ROOT" - ? x.rootDnaId == nodeId - : role == "CHILD" - ? ( - profileAdmin.Node == 4 ? x.child4DnaId == nodeId : - profileAdmin.Node == 3 ? x.child3DnaId == nodeId : - profileAdmin.Node == 2 ? x.child2DnaId == nodeId : - profileAdmin.Node == 1 ? x.child1DnaId == nodeId : - profileAdmin.Node == 0 ? x.rootDnaId == nodeId : - true - ) - : role == "BROTHER" - ? ( - profileAdmin.Node == 4 ? x.child3DnaId == nodeId : - profileAdmin.Node == 3 ? x.child2DnaId == nodeId : - profileAdmin.Node == 2 ? x.child1DnaId == nodeId : - ( - profileAdmin.Node == 1 || profileAdmin.Node == 0 - ) - ? x.rootDnaId == nodeId : true - ) - : role == "NORMAL" - ? ( - profileAdmin.Node == 0 ? x.rootDnaId == nodeId && x.child1DnaId == null : - profileAdmin.Node == 1 ? x.child1DnaId == nodeId && x.child2DnaId == null : - profileAdmin.Node == 2 ? x.child2DnaId == nodeId && x.child3DnaId == null : - profileAdmin.Node == 3 ? x.child3DnaId == nodeId && x.child4DnaId == null : - profileAdmin.Node == 4 ? x.child4DnaId == nodeId : - true - ) - : true - ) select x).ToList(); - var query = data_search - .Select(x => new - { - Id = x.Id, - CitizenId = x.CitizenId, - Prefix = x.Prefix, - FirstName = x.FirstName, - LastName = x.LastName, - ProfileId = x.PersonId, - Organization = x.Organization, - root = x.root, - rootId = x.rootId, - rootDnaId = x.rootDnaId, - rootShortName = x.rootShortName, - child1 = x.child1, - child1Id = x.child1Id, - child1DnaId = x.child1DnaId, - child1ShortName = x.child1ShortName, - child2 = x.child2, - child2Id = x.child2Id, - child2DnaId = x.child2DnaId, - child2ShortName = x.child2ShortName, - child3 = x.child3, - child3Id = x.child3Id, - child3DnaId = x.child3DnaId, - child3ShortName = x.child3ShortName, - child4 = x.child4, - child4Id = x.child4Id, - child4DnaId = x.child4DnaId, - child4ShortName = x.child4ShortName, - posMasterNo = x.posMasterNo, - posTypeId = x.posTypeId, - posTypeName = x.posTypeName, - posLevelId = x.posLevelId, - posLevelName = x.posLevelName, - - Position = x.Position, - PosNo = x.PosNo, - PositionLevel = x.PositionLevel == null ? "" : x.PositionLevel, - PositionType = x.PositionType == null ? "" : x.PositionType, - Salary = x.Salary, - Status = x.Status, - DescriptionSuspend = x.DescriptionSuspend, - StartDateSuspend = x.StartDateSuspend, - EndDateSuspend = x.EndDateSuspend, - Title = x.DisciplineDisciplinary.Title, - OffenseDetails = x.DisciplineDisciplinary.OffenseDetails,//ลักษณะความผิด - DisciplinaryFaultLevel = x.DisciplineDisciplinary.DisciplinaryFaultLevel,//ระดับโทษความผิด - DisciplinaryCaseFault = x.DisciplineDisciplinary.DisciplinaryCaseFault,//กรณีความผิด - profileType = x.profileType, - CreatedAt = x.CreatedAt, - }); - - bool desc = descending ?? false; - if (!string.IsNullOrEmpty(sortBy)) - { - if (sortBy == "title") - { - query = desc ? query.OrderByDescending(x => x.Title) - : query.OrderBy(x => x.Title); - } - else if (sortBy == "prefix" || sortBy == "firstName" || sortBy == "lastName") - { - query = desc ? - query.OrderByDescending(x => x.FirstName).ThenByDescending(x => x.LastName) : - query.OrderBy(x => x.FirstName).ThenBy(x => x.LastName); - } - else if (sortBy == "position") - { - query = desc ? query.OrderByDescending(x => x.Position) - : query.OrderBy(x => x.Position); - } - else if (sortBy == "positionType" || sortBy == "positionLevel") - { - query = desc ? - query - .OrderByDescending(x => x.PositionType) - .ThenByDescending(x => x.PositionLevel) : - query - .OrderBy(x => x.PositionType) - .ThenBy(x => x.PositionLevel); - } - else if (sortBy == "organization") - { - query = desc ? query.OrderByDescending(x => x.Organization) - : query.OrderBy(x => x.Organization); - } - else if (sortBy == "startDateSuspend") - { - query = desc ? query.OrderByDescending(x => x.StartDateSuspend) - : query.OrderBy(x => x.StartDateSuspend); - } - else if (sortBy == "endDateSuspend") - { - query = desc ? query.OrderByDescending(x => x.EndDateSuspend) - : query.OrderBy(x => x.EndDateSuspend); - } - else if (sortBy == "descriptionSuspend") - { - query = desc ? query.OrderByDescending(x => x.DescriptionSuspend) - : query.OrderBy(x => x.DescriptionSuspend); - } - else - { - query = query.OrderByDescending(x => x.profileType) - .ThenByDescending(x => x.CreatedAt) - .ThenByDescending(x => x.CitizenId); - } - } - - var data = query - .Skip((page - 1) * pageSize) - .Take(pageSize) - .ToList(); + var data = data_search + .Select(x => new + { + Id = x.Id, + CitizenId = x.CitizenId, + Prefix = x.Prefix, + FirstName = x.FirstName, + LastName = x.LastName, + ProfileId = x.PersonId, + Organization = x.Organization, + root = x.root, + rootId = x.rootId, + rootDnaId = x.rootDnaId, + rootShortName = x.rootShortName, + child1 = x.child1, + child1Id = x.child1Id, + child1DnaId = x.child1DnaId, + child1ShortName = x.child1ShortName, + child2 = x.child2, + child2Id = x.child2Id, + child2DnaId = x.child2DnaId, + child2ShortName = x.child2ShortName, + child3 = x.child3, + child3Id = x.child3Id, + child3DnaId = x.child3DnaId, + child3ShortName = x.child3ShortName, + child4 = x.child4, + child4Id = x.child4Id, + child4DnaId = x.child4DnaId, + child4ShortName = x.child4ShortName, + posMasterNo = x.posMasterNo, + posTypeId = x.posTypeId, + posTypeName = x.posTypeName, + posLevelId = x.posLevelId, + posLevelName = x.posLevelName, + Position = x.Position, + PosNo = x.PosNo, + PositionLevel = x.PositionLevel == null ? "" : x.PositionLevel, + PositionType = x.PositionType == null ? "" : x.PositionType, + Salary = x.Salary, + Status = x.Status, + DescriptionSuspend = x.DescriptionSuspend, + StartDateSuspend = x.StartDateSuspend, + EndDateSuspend = x.EndDateSuspend, + Title = x.DisciplineDisciplinary.Title, + OffenseDetails = x.DisciplineDisciplinary.OffenseDetails,//ลักษณะความผิด + DisciplinaryFaultLevel = x.DisciplineDisciplinary.DisciplinaryFaultLevel,//ระดับโทษความผิด + DisciplinaryCaseFault = x.DisciplineDisciplinary.DisciplinaryCaseFault,//กรณีความผิด + profileType = x.profileType, + CreatedAt = x.CreatedAt, + }) + .OrderByDescending(x => x.profileType) + .ThenByDescending(x => x.CreatedAt) + .ThenByDescending(x => x.CitizenId) + .Skip((page - 1) * pageSize) + .Take(pageSize) + .ToList(); return Success(new { data, total = data_search.Count() }); } @@ -331,7 +170,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers .Select(x => new { Id = x.Id, - ProfileId = x.PersonId, + PersonId = x.PersonId, CitizenId = x.CitizenId, Prefix = x.Prefix, FirstName = x.FirstName, @@ -439,7 +278,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - foreach (var item in req.id) + foreach (var item in req.Id) { var uppdated = await _context.DisciplineReport_Profiles .FirstOrDefaultAsync(x => x.Id == item); diff --git a/BMA.EHR.Discipline.Service/Program.cs b/BMA.EHR.Discipline.Service/Program.cs index 5a1f99c4..4ead4ce6 100644 --- a/BMA.EHR.Discipline.Service/Program.cs +++ b/BMA.EHR.Discipline.Service/Program.cs @@ -148,15 +148,13 @@ var app = builder.Build(); app.UseHttpsRedirection(); app.UseCors(); - - app.UseMiddleware(); app.UseAuthentication(); app.UseAuthorization(); app.UseDefaultFiles(); app.UseStaticFiles(); app.MapControllers(); - // app.UseMiddleware(); - // app.UseMiddleware(); + app.UseMiddleware(); + app.UseMiddleware(); app.UseHangfireDashboard("/hangfire", new DashboardOptions() { diff --git a/BMA.EHR.Discipline.Service/Requests/DisciplineComplaintRequest.cs b/BMA.EHR.Discipline.Service/Requests/DisciplineComplaintRequest.cs index b05ad34d..43beb9fa 100644 --- a/BMA.EHR.Discipline.Service/Requests/DisciplineComplaintRequest.cs +++ b/BMA.EHR.Discipline.Service/Requests/DisciplineComplaintRequest.cs @@ -63,21 +63,4 @@ namespace BMA.EHR.Discipline.Service.Requests public string? posLevelName { get; set; } public string? profileType { get; set; } } - public class DisciplineComplaintAdvanceSearcRequest - { - public int page { get; set; } = 1; - public int pageSize { get; set; } = 25; - public string keyword { get; set; } = string.Empty; - public string status { get; set; } = string.Empty; - public DateTime? dateReceivedStart { get; set; } // วันที่เริ่มต้นรับเรื่อง - public DateTime? dateReceivedEnd { get; set; } // วันที่สิ้นสุดรับเรื่อง - public string? respondentType { get; set; } // ผู้ถูกร้องเรียน - public string? offenseDetails { get; set; } // ลักษณะความผิด - public string? levelConsideration { get; set; } // ระดับการพิจารณา - public DateTime? dateConsiderationStart { get; set; } // วันที่เริ่มต้นการพิจารณา - public DateTime? dateConsiderationEnd { get; set; } // วันที่สิ้นสุดการพิจารณา - public string? sortBy { get; set; } - public bool? descending { get; set; } - - } } diff --git a/BMA.EHR.Discipline.Service/Requests/DisciplineDirectorRequest.cs b/BMA.EHR.Discipline.Service/Requests/DisciplineDirectorRequest.cs index 9ca16f9f..35f830c3 100644 --- a/BMA.EHR.Discipline.Service/Requests/DisciplineDirectorRequest.cs +++ b/BMA.EHR.Discipline.Service/Requests/DisciplineDirectorRequest.cs @@ -12,6 +12,5 @@ namespace BMA.EHR.Discipline.Service.Requests public string? email { get; set; } public string? phone { get; set; } public string? qualification { get; set; } - public Guid? rootDnaId { get; set; } } } diff --git a/BMA.EHR.Discipline.Service/Requests/DisciplineDisciplinaryRequest.cs b/BMA.EHR.Discipline.Service/Requests/DisciplineDisciplinaryRequest.cs index c23d236a..714c3afa 100644 --- a/BMA.EHR.Discipline.Service/Requests/DisciplineDisciplinaryRequest.cs +++ b/BMA.EHR.Discipline.Service/Requests/DisciplineDisciplinaryRequest.cs @@ -33,23 +33,4 @@ namespace BMA.EHR.Discipline.Service.Requests public string respondentType { get; set; }// *ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร) } - - public class DisciplineDisciplinaryAdvanceSearcRequest - { - public int page { get; set; } = 1; - public int pageSize { get; set; } = 25; - public string keyword { get; set; } = string.Empty; - public string status { get; set; } = string.Empty; - public string? respondentType { get; set; } // ผู้ถูกสืบสวน - public string? offenseDetails { get; set; } // ลักษณะความผิด - public string? disciplinaryFaultLevel { get; set; } // ระดับโทษความผิด - public string? disciplinaryCaseFault { get; set; } // กรณีความผิด - public DateTime? disciplinaryDateStart { get; set; } // วันที่สอบสวนเริ่มต้น - public DateTime? disciplinaryDateEnd { get; set; } // วันที่สิ้นสุดสอบสวน - public DateTime? dateReceivedStart { get; set; } // วันที่เริ่มต้นรับเรื่อง - public DateTime? dateReceivedEnd { get; set; } // วันที่สิ้นสุดรับเรื่อง - public string? sortBy { get; set; } - public bool? descending { get; set; } - - } } diff --git a/BMA.EHR.Discipline.Service/Requests/DisciplineInvestigateRequest.cs b/BMA.EHR.Discipline.Service/Requests/DisciplineInvestigateRequest.cs index fc27a490..99897d30 100644 --- a/BMA.EHR.Discipline.Service/Requests/DisciplineInvestigateRequest.cs +++ b/BMA.EHR.Discipline.Service/Requests/DisciplineInvestigateRequest.cs @@ -21,23 +21,4 @@ namespace BMA.EHR.Discipline.Service.Requests public string respondentType { get; set; }// *ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร) } - - public class DisciplineInvestigateAdvanceSearcRequest - { - public int page { get; set; } = 1; - public int pageSize { get; set; } = 25; - public string keyword { get; set; } = string.Empty; - public string status { get; set; } = string.Empty; - public string? respondentType { get; set; } // ผู้ถูกสืบสวน - public string? offenseDetails { get; set; } // ลักษณะความผิด - public string? investigationDetail { get; set; } // ลักษณะการสืบสวน - public DateTime? investigationDateStart { get; set; } // วันที่สืบสวนเริ่มต้น - public DateTime? investigationDateEnd { get; set; } // วันที่สิ้นสุดสืบสวน - public DateTime? dateReceivedStart { get; set; } // วันที่เริ่มต้นรับเรื่อง - public DateTime? dateReceivedEnd { get; set; } // วันที่สิ้นสุดรับเรื่อง - public string? investigationStatusResult { get; set; } // ผลการสืบสวน - public string? sortBy { get; set; } - public bool? descending { get; set; } - - } } diff --git a/BMA.EHR.Discipline.Service/Requests/DisciplineResultRequest.cs b/BMA.EHR.Discipline.Service/Requests/DisciplineResultRequest.cs index 7481c76a..29c2b10d 100644 --- a/BMA.EHR.Discipline.Service/Requests/DisciplineResultRequest.cs +++ b/BMA.EHR.Discipline.Service/Requests/DisciplineResultRequest.cs @@ -10,26 +10,4 @@ namespace BMA.EHR.Discipline.Service.Requests public string? titleType { get; set; }// public int? year { get; set; }// } - - public class DisciplineResultAdvanceSearcRequest - { - public int page { get; set; } = 1; - public int pageSize { get; set; } = 25; - public string keyword { get; set; } = string.Empty; - public string status { get; set; } = string.Empty; - public string? respondentType { get; set; } // ผู้ถูกสืบสวน - public string? offenseDetails { get; set; } // ลักษณะความผิด - public string? disciplinaryFaultLevel { get; set; } // ระดับโทษความผิด - public string? disciplinaryCaseFault { get; set; } // กรณีความผิด - public DateTime? disciplinaryDateStart { get; set; } // วันที่เริ่มต้นสอบสวน - public DateTime? disciplinaryDateEnd { get; set; } // วันที่สิ้นสุดสอบสวน - public string? resultDisciplineType { get; set; } // ประเภทวินัย - public string? resultTitleType { get; set; } // ประเภทของเรื่อง - public string? resultOc { get; set; } // หน่วยงาน/ส่วนราชการ - public int? resultYear { get; set; } // ปีงบประมาณ - public string? sortBy { get; set; } - public bool? descending { get; set; } - - - } } diff --git a/BMA.EHR.Discipline.Service/Requests/DisciplineResultSummaryRequest.cs b/BMA.EHR.Discipline.Service/Requests/DisciplineResultSummaryRequest.cs deleted file mode 100644 index 4451361f..00000000 --- a/BMA.EHR.Discipline.Service/Requests/DisciplineResultSummaryRequest.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace BMA.EHR.Discipline.Service.Requests -{ - public class DisciplineResultSummaryRequest - { - public string? remark { get; set; } - public string? offense { get; set; } - } -} diff --git a/BMA.EHR.Discipline.Service/Requests/OrgRequest.cs b/BMA.EHR.Discipline.Service/Requests/OrgRequest.cs deleted file mode 100644 index c1e84290..00000000 --- a/BMA.EHR.Discipline.Service/Requests/OrgRequest.cs +++ /dev/null @@ -1,55 +0,0 @@ -namespace BMA.EHR.Discipline.Service.Requests -{ - public class OrgRequest - { - public OrgRequestData result { get; set; } = new(); - } - public class OrgRequestData - { - public string? profileId { get; set; } - public string? prefix { get; set; } - public string? firstName { get; set; } - public string? lastName { get; set; } - public string? citizenId { get; set; } - public string? root { get; set; } - public string? rootId { get; set; } - public string? rootDnaId { get; set; } - public string? rootShortName { get; set; } - public string? child1 { get; set; } - public string? child1Id { get; set; } - public string? child1DnaId { get; set; } - public string? child1ShortName { get; set; } - public string? child2 { get; set; } - public string? child2Id { get; set; } - public string? child2DnaId { get; set; } - public string? child2ShortName { get; set; } - public string? child3 { get; set; } - public string? child3Id { get; set; } - public string? child3DnaId { get; set; } - public string? child3ShortName { get; set; } - public string? child4 { get; set; } - public string? child4Id { get; set; } - public string? child4DnaId { get; set; } - public string? child4ShortName { get; set; } - public string? node { get; set; } - public string? nodeId { get; set; } - public string? nodeShortName { get; set; } - public int? posMasterNo { get; set; } - public string? position { get; set; } - public string? posTypeId { get; set; } - public string? posTypeName { get; set; } - public int? posTypeRank { get; set; } - public string? posLevelId { get; set; } - public string? posTypeShortName { get; set; } - public string? posLevelName { get; set; } - public int? posLevelRank { get; set; } - public string? posExecutiveId { get; set; } - public string? posExecutiveName { get; set; } - public string? positionExecutiveField { get; set; } - public string? positionArea { get; set; } - public string? posNo { get; set; } - public DateTime? leaveDate { get; set; } - public string? education { get; set; } - public double? salary { get; set; } - } -} \ No newline at end of file diff --git a/BMA.EHR.Discipline.Service/Requests/ReportPersonRequest.cs b/BMA.EHR.Discipline.Service/Requests/ReportPersonRequest.cs index f7a16efc..b8d37c24 100644 --- a/BMA.EHR.Discipline.Service/Requests/ReportPersonRequest.cs +++ b/BMA.EHR.Discipline.Service/Requests/ReportPersonRequest.cs @@ -6,14 +6,6 @@ namespace BMA.EHR.Discipline.Service.Requests public class ReportPersonRequest { public string[] refIds { get; set; } - public string? status { get; set; } - } - - public class ReportPersonAndCommandRequest - { - public string[] refIds { get; set; } - public string? status { get; set; } - public string? commandTypeId { get; set; } - public string? commandCode { get; set; } + public string status { get; set; } } } diff --git a/BMA.EHR.Discipline.Service/Requests/RetirementProfileRequest.cs b/BMA.EHR.Discipline.Service/Requests/RetirementProfileRequest.cs index ff999c8a..42d10463 100644 --- a/BMA.EHR.Discipline.Service/Requests/RetirementProfileRequest.cs +++ b/BMA.EHR.Discipline.Service/Requests/RetirementProfileRequest.cs @@ -5,8 +5,6 @@ namespace BMA.EHR.Discipline.Service.Requests { public class DisciplineProfileRequest { - public List id { get; set; } - public FormFile? file { get; set; } - public string? remark { get; set; } + public List Id { get; set; } } } diff --git a/BMA.EHR.Domain/BMA.EHR.Domain.csproj b/BMA.EHR.Domain/BMA.EHR.Domain.csproj index 16f82ee7..be1779a2 100644 --- a/BMA.EHR.Domain/BMA.EHR.Domain.csproj +++ b/BMA.EHR.Domain/BMA.EHR.Domain.csproj @@ -1,21 +1,18 @@  - - net6.0 - enable - enable - false - $(NoWarn);$(WarningsNotAsErrors) + + net6.0 + enable + enable + - - - - - - - - - - + + + + + + + + diff --git a/BMA.EHR.Domain/Common/BaseController.cs b/BMA.EHR.Domain/Common/BaseController.cs index 0b382d95..44d8dac0 100644 --- a/BMA.EHR.Domain/Common/BaseController.cs +++ b/BMA.EHR.Domain/Common/BaseController.cs @@ -1,5 +1,4 @@ -using BMA.EHR.Domain.Extensions; -using BMA.EHR.Domain.Shared; +using BMA.EHR.Domain.Shared; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; @@ -82,23 +81,6 @@ namespace BMA.EHR.Domain.Common } - #endregion - - #region " Properties " - - protected string? EmpType => User.GetEmpType(); - protected Guid? OrgChild1DnaId => User.GetOrgChild1DnaId(); - protected Guid? OrgChild2DnaId => User.GetOrgChild2DnaId(); - protected Guid? OrgChild3DnaId => User.GetOrgChild3DnaId(); - protected Guid? OrgChild4DnaId => User.GetOrgChild4DnaId(); - protected Guid? OrgRootDnaId => User.GetOrgRootDnaId(); - protected Guid? ProfileId => User.GetProfileId(); - protected string? Prefix => User.GetPrefix(); - protected string? FullNameFromClaim => User.GetName(); - - protected string? FirstName => User.GetFirstName(); - protected string? LastName => User.GetLastName(); - #endregion #endregion diff --git a/BMA.EHR.Domain/Common/TokenUserInfo.cs b/BMA.EHR.Domain/Common/TokenUserInfo.cs deleted file mode 100644 index cdae6fb1..00000000 --- a/BMA.EHR.Domain/Common/TokenUserInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace BMA.EHR.Domain.Common -{ - public class TokenUserInfo - { - // Existing properties - public string KeycloakId { get; set; } = string.Empty; - public string? PreferredUsername { get; set; } - public string? GivenName { get; set; } - public string? FamilyName { get; set; } - - // New properties to add - public string? EmpType { get; set; } - public Guid? OrgChild1DnaId { get; set; } - public Guid? OrgChild2DnaId { get; set; } - public Guid? OrgChild3DnaId { get; set; } - public Guid? OrgChild4DnaId { get; set; } - public Guid? OrgRootDnaId { get; set; } - public Guid? ProfileId { get; set; } - public string? Prefix { get; set; } - public string? Name { get; set; } - } - - // Claim type constants - public static class BmaClaimTypes - { - public const string EmpType = "empType"; - public const string OrgChild1DnaId = "orgChild1DnaId"; - public const string OrgChild2DnaId = "orgChild2DnaId"; - public const string OrgChild3DnaId = "orgChild3DnaId"; - public const string OrgChild4DnaId = "orgChild4DnaId"; - public const string OrgRootDnaId = "orgRootDnaId"; - public const string ProfileId = "profileId"; - public const string Prefix = "prefix"; - public const string Name = "name"; - public const string GivenName = "given_name"; - public const string FamilyName = "family_name"; - public const string PreferredUsername = "preferred_username"; - } -} diff --git a/BMA.EHR.Domain/Extensions/ClaimsPrincipalExtensions.cs b/BMA.EHR.Domain/Extensions/ClaimsPrincipalExtensions.cs deleted file mode 100644 index cc44f8a1..00000000 --- a/BMA.EHR.Domain/Extensions/ClaimsPrincipalExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using BMA.EHR.Domain.Common; -using System.Security.Claims; - -namespace BMA.EHR.Domain.Extensions -{ - public static class ClaimsPrincipalExtensions - { - public static string? GetClaimValue(this ClaimsPrincipal user, string claimType) - { - return user?.FindFirst(claimType)?.Value; - } - - public static Guid? GetGuidClaim(this ClaimsPrincipal user, string claimType) - { - var value = user?.GetClaimValue(claimType); - return Guid.TryParse(value, out var guid) ? guid : null; - } - - // Convenience methods for common claims - public static string? GetEmpType(this ClaimsPrincipal user) => user.GetClaimValue(BmaClaimTypes.EmpType); - public static Guid? GetOrgChild1DnaId(this ClaimsPrincipal user) => user.GetGuidClaim(BmaClaimTypes.OrgChild1DnaId); - public static Guid? GetOrgChild2DnaId(this ClaimsPrincipal user) => user.GetGuidClaim(BmaClaimTypes.OrgChild2DnaId); - public static Guid? GetOrgChild3DnaId(this ClaimsPrincipal user) => user.GetGuidClaim(BmaClaimTypes.OrgChild3DnaId); - public static Guid? GetOrgChild4DnaId(this ClaimsPrincipal user) => user.GetGuidClaim(BmaClaimTypes.OrgChild4DnaId); - public static Guid? GetOrgRootDnaId(this ClaimsPrincipal user) => user.GetGuidClaim(BmaClaimTypes.OrgRootDnaId); - public static Guid? GetProfileId(this ClaimsPrincipal user) => user.GetGuidClaim(BmaClaimTypes.ProfileId); - public static string? GetPrefix(this ClaimsPrincipal user) => user.GetClaimValue(BmaClaimTypes.Prefix); - public static string? GetName(this ClaimsPrincipal user) => user.GetClaimValue(BmaClaimTypes.Name); - public static string? GetFirstName(this ClaimsPrincipal user) => user.GetClaimValue(BmaClaimTypes.GivenName); - public static string? GetLastName(this ClaimsPrincipal user) => user.GetClaimValue(BmaClaimTypes.FamilyName); - } -} diff --git a/BMA.EHR.Domain/Extensions/DateTimeExtension.cs b/BMA.EHR.Domain/Extensions/DateTimeExtension.cs index bbfc0a12..27ebc5a8 100644 --- a/BMA.EHR.Domain/Extensions/DateTimeExtension.cs +++ b/BMA.EHR.Domain/Extensions/DateTimeExtension.cs @@ -174,29 +174,6 @@ namespace BMA.EHR.Domain.Extensions } } - public static (int Years, int Months, int Days) GetDifference(this DateTime from, DateTime to) - { - if (from > to) (from, to) = (to, from); // swap ถ้าลำดับสลับ - - int years = to.Year - from.Year; - int months = to.Month - from.Month; - int days = to.Day - from.Day; - - if (days < 0) - { - months--; - days += DateTime.DaysInMonth(to.Year, to.Month == 1 ? 12 : to.Month - 1); - } - - if (months < 0) - { - years--; - months += 12; - } - - return (years, months, days); - } - public static int CalculateAge(this DateTime date, int plusYear = 0, int subtractYear = 0) { try @@ -447,18 +424,6 @@ namespace BMA.EHR.Domain.Extensions }; } - public static int CalculateFisicalYear(this DateTime value) - { - if (value.Month >= 10) - { - return value.Year + 1; - } - else - { - return value.Year; - } - } - #endregion #endregion diff --git a/BMA.EHR.Domain/Middlewares/CombinedErrorHandlerAndLoggingMiddleware.cs b/BMA.EHR.Domain/Middlewares/CombinedErrorHandlerAndLoggingMiddleware.cs deleted file mode 100644 index 4216fa43..00000000 --- a/BMA.EHR.Domain/Middlewares/CombinedErrorHandlerAndLoggingMiddleware.cs +++ /dev/null @@ -1,913 +0,0 @@ -using BMA.EHR.Domain.Common; -using BMA.EHR.Domain.Shared; -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Configuration; -using Nest; -using Newtonsoft.Json; -using System.Diagnostics; -using System.Net; -using System.Net.Http.Headers; -using System.Security.Claims; -using System.Text.Encodings.Web; -using System.Text.Json; -using JsonSerializer = System.Text.Json.JsonSerializer; - -namespace BMA.EHR.Domain.Middlewares -{ - public class CombinedErrorHandlerAndLoggingMiddleware - { - private readonly RequestDelegate _next; - private readonly IConfiguration _configuration; - private static ElasticClient? _elasticClient; - private static readonly object _lock = new object(); - private static readonly Dictionary _profileCache = new(); - private static readonly TimeSpan _cacheExpiry = TimeSpan.FromMinutes(10); - - private string Uri = ""; - private string IndexFormat = ""; - private string SystemName = ""; - - public CombinedErrorHandlerAndLoggingMiddleware(RequestDelegate next, IConfiguration configuration) - { - _next = next; - _configuration = configuration; - - Uri = _configuration["ElasticConfiguration:Uri"] ?? "http://192.168.1.40:9200"; - IndexFormat = _configuration["ElasticConfiguration:IndexFormat"] ?? "bma-ehr-log-index"; - SystemName = _configuration["ElasticConfiguration:SystemName"] ?? "Unknown"; - - // สร้าง ElasticClient แค่ครั้งเดียว - if (_elasticClient == null) - { - lock (_lock) - { - if (_elasticClient == null) - { - var settings = new ConnectionSettings(new Uri(Uri)) - .DefaultIndex(IndexFormat) - .DisableDirectStreaming() // เพิ่มประสิทธิภาพ - .RequestTimeout(TimeSpan.FromSeconds(5)); // กำหนด timeout - _elasticClient = new ElasticClient(settings); - } - } - } - } - - public async Task Invoke(HttpContext context) - { - var startTime = DateTime.UtcNow; - var stopwatch = Stopwatch.StartNew(); - string? requestBodyJson = null; - Exception? caughtException = null; - - // อ่าน Request Body - string requestBody = await ReadRequestBodyAsync(context); - if (!string.IsNullOrEmpty(requestBody)) - { - requestBodyJson = await FormatRequestBody(context, requestBody); - } - - var originalBodyStream = context.Response.Body; - - using (var memoryStream = new MemoryStream()) - { - // เปลี่ยน stream ของ Response เพื่อให้สามารถอ่านได้ - context.Response.Body = memoryStream; - - string keycloakId = Guid.Empty.ToString("D"); - var token = context.Request.Headers["Authorization"]; - GetProfileByKeycloakIdLocal? pf = null; - var tokenUserInfo = await ExtractTokenUserInfoAsync(token); - - // Store tokenUserInfo in HttpContext.Items for controllers to use - context.Items["TokenUserInfo"] = tokenUserInfo; - - // ดึง keycloakId จาก JWT token - keycloakId = tokenUserInfo.KeycloakId; - - // ดึง profile จาก claims หรือ cache หรือ API - if (Guid.TryParse(keycloakId, out var parsedId) && parsedId != Guid.Empty) - { - // Build profile from token claims if available - if (tokenUserInfo.OrgRootDnaId.HasValue && tokenUserInfo.ProfileId.HasValue) - { - pf = new GetProfileByKeycloakIdLocal - { - Id = tokenUserInfo.ProfileId.Value, - CitizenId = tokenUserInfo.PreferredUsername, - Prefix = tokenUserInfo.Prefix, - FirstName = tokenUserInfo.GivenName, - LastName = tokenUserInfo.FamilyName, - RootDnaId = tokenUserInfo.OrgRootDnaId, - Child1DnaId = tokenUserInfo.OrgChild1DnaId, - Child2DnaId = tokenUserInfo.OrgChild2DnaId, - Child3DnaId = tokenUserInfo.OrgChild3DnaId, - Child4DnaId = tokenUserInfo.OrgChild4DnaId, - }; - Console.WriteLine($"[INFO] Using claims for profile - OrgRootDnaId: {pf.RootDnaId}, ProfileId: {pf.Id}"); - } - else - { - // Fallback to API only if critical claims are missing - Console.WriteLine("[WARN] Critical claims missing, falling back to API call"); - pf = await GetProfileWithCacheAsync(parsedId, token); - } - } - - try - { - await _next(context); - Console.WriteLine($"Request completed with status: {context.Response.StatusCode}"); - - // หลังจาก Authentication middleware ทำงานแล้ว ลองดึง claims อีกครั้ง - if (context.User?.Identity?.IsAuthenticated == true) - { - var authenticatedKeycloakId = context.User.FindFirst(ClaimTypes.NameIdentifier)?.Value - ?? context.User.FindFirst("sub")?.Value; - if (!string.IsNullOrEmpty(authenticatedKeycloakId) && authenticatedKeycloakId != keycloakId) - { - keycloakId = authenticatedKeycloakId; - Console.WriteLine($"Updated keycloakId from authenticated user: {keycloakId}"); - - // อัพเดต profile ด้วย keycloakId ที่ถูกต้อง - // try - // { - // if (Guid.TryParse(keycloakId, out var parsedId)) - // { - // //pf = await GetProfileByKeycloakIdAsync(parsedId, token); - // } - // } - // catch (Exception ex) - // { - // Console.WriteLine($"Error updating profile after authentication: {ex.Message}"); - // } - } - } - - // จัดการ response format หลังจาก request ผ่าน pipeline แล้ว - await FormatResponse(context, memoryStream); - } - catch (ObjectDisposedException) - { - Console.WriteLine("ObjectDisposedException caught in main Invoke"); - caughtException = new ObjectDisposedException("Response"); - return; - } - catch (OperationCanceledException) - { - Console.WriteLine("OperationCanceledException caught in main Invoke"); - caughtException = new OperationCanceledException("Operation was cancelled"); - return; - } - catch (Exception error) - { - Console.WriteLine($"Exception caught in main Invoke: {error.Message}"); - caughtException = error; - // จัดการ exception และ format เป็น response - await FormatExceptionResponse(context, error, memoryStream); - } - finally - { - stopwatch.Stop(); - - // อ่านข้อมูล response ก่อนที่ stream จะถูก dispose - string? responseBodyForLogging = null; - if (memoryStream.Length > 0) - { - memoryStream.Seek(0, SeekOrigin.Begin); - using var reader = new StreamReader(memoryStream, leaveOpen: true); - responseBodyForLogging = await reader.ReadToEndAsync(); - memoryStream.Seek(0, SeekOrigin.Begin); - } - - // เก็บข้อมูลที่จำเป็นจาก HttpContext ก่อนที่มันจะถูก dispose - var logData = new - { - RemoteIpAddress = context.Connection.RemoteIpAddress?.ToString(), - HostValue = context.Request.Host.Value, - Method = context.Request.Method, - Path = context.Request.Path.ToString(), - QueryString = context.Request.QueryString.ToString(), - StatusCode = context.Response.StatusCode, - ContentType = context.Response.ContentType ?? "" - }; - - // เขียนข้อมูลกลับไปยัง original Response body ก่อน - if (memoryStream.Length > 0) - { - memoryStream.Seek(0, SeekOrigin.Begin); - await memoryStream.CopyToAsync(originalBodyStream); - } - - // ทำ logging แบบ await - Console.WriteLine("[DEBUG] Starting logging..."); - try - { - await LogRequestAsync(_elasticClient!, startTime, stopwatch, pf, keycloakId, requestBodyJson, responseBodyForLogging, caughtException, logData); - Console.WriteLine("[DEBUG] Logging completed successfully"); - } - catch (Exception ex) - { - Console.WriteLine($"[ERROR] Logging error: {ex.Message}"); - Console.WriteLine($"[ERROR] Stack trace: {ex.StackTrace}"); - } - } - } - - Console.WriteLine("=== CombinedErrorHandlerAndLoggingMiddleware End ==="); - } - - private async Task FormatRequestBody(HttpContext context, string requestBody) - { - try - { - if (context.Request.HasFormContentType) - { - var form = await context.Request.ReadFormAsync(); - var formData = new Dictionary(); - - foreach (var field in form) - { - formData[field.Key] = field.Value.ToString(); - } - - if (form.Files.Count > 0) - { - var fileDataList = new List(); - foreach (var file in form.Files) - { - fileDataList.Add(new - { - FileName = file.FileName, - ContentType = file.ContentType, - Size = file.Length - }); - } - formData["Files"] = fileDataList; - } - - var jsonOptions = new JsonSerializerOptions - { - PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, - WriteIndented = true, - Converters = { new DateTimeFixConverter() } - }; - return JsonSerializer.Serialize(formData, jsonOptions); - } - else - { - var jsonOptions = new JsonSerializerOptions - { - PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, - WriteIndented = true, - Converters = { new DateTimeFixConverter() } - }; - return JsonSerializer.Serialize(JsonSerializer.Deserialize(requestBody), jsonOptions); - } - } - catch (Exception ex) - { - Console.WriteLine($"Error formatting request body: {ex.Message}"); - return requestBody; - } - } - - private static async Task FormatResponse(HttpContext context, MemoryStream memoryStream) - { - try - { - if (context?.Response == null) - return; - - var response = context.Response; - var statusCode = response.StatusCode; - - - string? message = null; - string? responseBodyJson = null; - if (memoryStream.Length > 0) - { - memoryStream.Seek(0, SeekOrigin.Begin); - var responseBody = new StreamReader(memoryStream).ReadToEnd(); - - var jsonOptions = new JsonSerializerOptions - { - PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, - WriteIndented = true, - Converters = { new DateTimeFixConverter() } - }; - responseBodyJson = - JsonSerializer.Serialize(JsonSerializer.Deserialize(responseBody), jsonOptions); - - var json = JsonSerializer.Deserialize(responseBody); - if (json.ValueKind == JsonValueKind.Array) - { - message = "success"; - } - else - { - if (json.TryGetProperty("message", out var messageElement)) - { - message = messageElement.GetString(); - } - } - } - - Console.WriteLine($"FormatResponse: StatusCode={statusCode}, HasStarted={response.HasStarted}"); - - // จัดการ response format แม้กับ status code จาก Authentication middleware - if (!response.HasStarted && ShouldFormatResponse(statusCode)) - { - Console.WriteLine($"Formatting response for status: {statusCode}"); - - var responseModel = CreateResponseModel(statusCode, message); - - // Clear memory stream และเขียน response ใหม่ - memoryStream.SetLength(0); - memoryStream.Position = 0; - - // ไม่เปลี่ยน status code ที่ Authentication middleware ตั้งไว้ - response.ContentType = "application/json; charset=utf-8"; - - var jsonOptions = new JsonSerializerOptions - { - PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - WriteIndented = false - }; - var jsonResponse = JsonSerializer.Serialize(responseModel, jsonOptions); - var bytes = System.Text.Encoding.UTF8.GetBytes(jsonResponse); - - // กำหนด Content-Length ให้ตรงกับขนาดจริง - response.ContentLength = bytes.Length; - - await memoryStream.WriteAsync(bytes, 0, bytes.Length); - - Console.WriteLine($"Response formatted successfully: {jsonResponse}"); - } - // หากเป็น 401/403 แต่ยังไม่มี response body ให้สร้างใหม่ - else if (!response.HasStarted && (statusCode == 401 || statusCode == 403) && memoryStream.Length == 0) - { - Console.WriteLine($"Creating response body for {statusCode} status"); - - var responseModel = CreateResponseModel(statusCode, message); - response.ContentType = "application/json; charset=utf-8"; - - var jsonOptions = new JsonSerializerOptions - { - PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - WriteIndented = false - }; - var jsonResponse = JsonSerializer.Serialize(responseModel, jsonOptions); - var bytes = System.Text.Encoding.UTF8.GetBytes(jsonResponse); - - // กำหนด Content-Length ให้ตรงกับขนาดจริง - response.ContentLength = bytes.Length; - - await memoryStream.WriteAsync(bytes, 0, bytes.Length); - - Console.WriteLine($"Response body created: {jsonResponse}"); - } - } - catch (ObjectDisposedException) - { - Console.WriteLine("ObjectDisposedException in FormatResponse"); - } - catch (Exception ex) - { - Console.WriteLine($"Error in FormatResponse: {ex.Message}"); - } - } - - private static async Task FormatExceptionResponse(HttpContext context, Exception error, MemoryStream memoryStream) - { - try - { - Console.WriteLine($"FormatExceptionResponse: Error={error.Message}"); - - if (context?.Response == null) - return; - - var response = context.Response; - Console.WriteLine($"Response HasStarted: {response.HasStarted}"); - - if (!response.HasStarted) - { - // Clear memory stream และเขียน error response - memoryStream.SetLength(0); - memoryStream.Position = 0; - - response.StatusCode = (int)HttpStatusCode.InternalServerError; - response.ContentType = "application/json; charset=utf-8"; - - var responseModel = new ResponseObject - { - Status = response.StatusCode, - Message = GetErrorMessage(error), - Result = null - }; - - var jsonOptions = new JsonSerializerOptions - { - PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - WriteIndented = false - }; - var jsonResponse = JsonSerializer.Serialize(responseModel, jsonOptions); - var bytes = System.Text.Encoding.UTF8.GetBytes(jsonResponse); - - // กำหนด Content-Length ให้ตรงกับขนาดจริง - response.ContentLength = bytes.Length; - - - await memoryStream.WriteAsync(bytes, 0, bytes.Length); - - Console.WriteLine($"Exception response formatted: {jsonResponse}"); - } - else - { - Console.WriteLine("Cannot format exception response - response already started"); - } - } - catch (ObjectDisposedException) - { - Console.WriteLine("ObjectDisposedException in FormatExceptionResponse"); - } - catch (Exception ex) - { - Console.WriteLine($"Error in FormatExceptionResponse: {ex.Message}"); - } - } - - private async Task LogRequestAsync(ElasticClient client, DateTime startTime, Stopwatch stopwatch, - GetProfileByKeycloakIdLocal? pf, string keycloakId, string? requestBodyJson, string? responseBodyForLogging, Exception? caughtException, dynamic contextData) - { - Console.WriteLine("[DEBUG] LogRequestAsync called"); - try - { - var processTime = stopwatch.ElapsedMilliseconds; - var endTime = DateTime.UtcNow; - - var statusCode = caughtException != null ? (int)HttpStatusCode.InternalServerError : (int)contextData.StatusCode; - - var logType = caughtException != null ? "error" : statusCode switch - { - >= 500 => "error", - >= 400 => "warning", - _ => "info" - }; - - string? message = null; - string? responseBodyJson = null; - - // ใช้ response body ที่ส่งมาจากการอ่านก่อนหน้า - if (!string.IsNullOrEmpty(responseBodyForLogging)) - { - var contentType = (string)contextData.ContentType; - var isFileResponse = !contentType.StartsWith("application/json") && !contentType.StartsWith("text/html") && ( - contentType.StartsWith("application/") || - contentType.StartsWith("image/") || - contentType.StartsWith("audio/") - ); - - if (isFileResponse) - { - responseBodyJson = ""; - message = "success"; - } - else - { - // ใช้ response body ที่มีอยู่แล้วโดยไม่ serialize ซ้ำ - responseBodyJson = responseBodyForLogging; - - try - { - var json = JsonSerializer.Deserialize(responseBodyForLogging); - if (json.ValueKind == JsonValueKind.Array) - { - message = "success"; - } - else if (json.TryGetProperty("message", out var messageElement)) - { - message = messageElement.GetString(); - } - } - catch - { - message = caughtException?.Message ?? "Unknown error"; - } - } - } - - if (caughtException != null) - { - message = caughtException.Message; - } - - var logData = new - { - logType = logType, - ip = (string)contextData.RemoteIpAddress, - //rootId = pf?.RootId, - rootId = pf?.RootDnaId, - systemName = SystemName, - startTimeStamp = startTime.ToString("o"), - endTimeStamp = endTime.ToString("o"), - processTime = processTime, - host = (string)contextData.HostValue, - method = (string)contextData.Method, - endpoint = (string)contextData.Path + (string)contextData.QueryString, - responseCode = statusCode == 304 ? "200" : statusCode.ToString(), - responseDescription = message, - input = requestBodyJson, - output = responseBodyJson, - userId = keycloakId, - userName = $"{pf?.Prefix ?? ""}{pf?.FirstName ?? ""} {pf?.LastName ?? ""}", - user = pf?.CitizenId ?? "", - exception = caughtException?.ToString() - }; - - Console.WriteLine($"[DEBUG] Sending log to Elasticsearch: {logType} - {(string)contextData.Method} {(string)contextData.Path}"); - var response = await client.IndexDocumentAsync(logData); - Console.WriteLine($"[DEBUG] Elasticsearch response: IsValid={response.IsValid}, Index={response.Index}"); - - if (!response.IsValid) - { - Console.WriteLine($"[ERROR] Elasticsearch error: {response.OriginalException?.Message ?? response.ServerError?.ToString()}"); - } - } - catch (Exception ex) - { - Console.WriteLine($"[ERROR] Error logging request: {ex.Message}"); - Console.WriteLine($"[ERROR] Stack trace: {ex.StackTrace}"); - } - } - - private static bool ShouldFormatResponse(int statusCode) - { - return statusCode == (int)HttpStatusCode.Unauthorized || - statusCode == (int)HttpStatusCode.Forbidden || - statusCode == (int)HttpStatusCode.BadRequest || - statusCode == (int)HttpStatusCode.NotFound || - statusCode == (int)HttpStatusCode.Conflict || - statusCode == (int)HttpStatusCode.UnprocessableEntity || - statusCode == (int)HttpStatusCode.InternalServerError; - } - - private static ResponseObject CreateResponseModel(int statusCode, string? error) - { - var message = statusCode switch - { - (int)HttpStatusCode.Unauthorized => GlobalMessages.NotAuthorized, - (int)HttpStatusCode.Forbidden => GlobalMessages.ForbiddenAccess, - (int)HttpStatusCode.BadRequest => "Bad Request", - (int)HttpStatusCode.NotFound => "Resource Not Found", - (int)HttpStatusCode.Conflict => "Conflict", - (int)HttpStatusCode.UnprocessableEntity => "Validation Error", - (int)HttpStatusCode.InternalServerError => GlobalMessages.ExceptionOccured, - _ => "Error" - }; - - return new ResponseObject - { - Status = statusCode, - Message = error ?? message - }; - } - - private static string GetErrorMessage(Exception error) - { - var msg = error.Message; - var inner = error.InnerException; - while (inner != null) - { - msg += $" {inner.Message}\r\n"; - inner = inner.InnerException; - } - return msg; - } - - private async Task ExtractKeycloakIdFromToken(string? authorizationHeader) - { - var tokenInfo = await ExtractTokenUserInfoAsync(authorizationHeader); - return tokenInfo.KeycloakId; - } - - private async Task ExtractTokenUserInfoAsync(string? authorizationHeader) - { - var defaultResult = new TokenUserInfo { KeycloakId = Guid.Empty.ToString("D") }; - - try - { - if (string.IsNullOrEmpty(authorizationHeader) || !authorizationHeader.StartsWith("Bearer ")) - { - return defaultResult; - } - - var token = authorizationHeader.Replace("Bearer ", ""); - - // แยก JWT token เพื่อดึง payload (แบบง่าย โดยไม่ verify signature) - var parts = token.Split('.'); - if (parts.Length != 3) - { - return defaultResult; - } - - // Decode Base64Url payload (JWT uses Base64Url encoding, not standard Base64) - var payload = parts[1]; - - // แปลง Base64Url เป็น Base64 ก่อน - payload = payload.Replace('-', '+').Replace('_', '/'); - - // เพิ่ม padding ถ้าจำเป็น - var padLength = 4 - (payload.Length % 4); - if (padLength < 4) - { - payload += new string('=', padLength); - } - - var payloadBytes = Convert.FromBase64String(payload); - var payloadJson = System.Text.Encoding.UTF8.GetString(payloadBytes); - - Console.WriteLine($"JWT Payload: {payloadJson}"); - - // Parse JSON และดึง claims ต่างๆ - var jsonDoc = JsonDocument.Parse(payloadJson); - var result = new TokenUserInfo(); - - // ดึง keycloak ID - if (jsonDoc.RootElement.TryGetProperty("sub", out var subElement)) - { - result.KeycloakId = subElement.GetString() ?? Guid.Empty.ToString("D"); - } - else if (jsonDoc.RootElement.TryGetProperty("nameid", out var nameidElement)) - { - result.KeycloakId = nameidElement.GetString() ?? Guid.Empty.ToString("D"); - } - else if (jsonDoc.RootElement.TryGetProperty("user_id", out var userIdElement)) - { - result.KeycloakId = userIdElement.GetString() ?? Guid.Empty.ToString("D"); - } - else - { - result.KeycloakId = Guid.Empty.ToString("D"); - } - - // ดึง preferred_username - if (jsonDoc.RootElement.TryGetProperty("preferred_username", out var preferredUsernameElement)) - { - result.PreferredUsername = preferredUsernameElement.GetString(); - Console.WriteLine($"Extracted preferred_username: {result.PreferredUsername}"); - } - - // ดึง given_name - if (jsonDoc.RootElement.TryGetProperty("given_name", out var givenNameElement)) - { - result.GivenName = givenNameElement.GetString(); - Console.WriteLine($"Extracted given_name: {result.GivenName}"); - } - - // ดึง family_name - if (jsonDoc.RootElement.TryGetProperty("family_name", out var familyNameElement)) - { - result.FamilyName = familyNameElement.GetString(); - Console.WriteLine($"Extracted family_name: {result.FamilyName}"); - } - - // ดึง empType - if (jsonDoc.RootElement.TryGetProperty("empType", out var empTypeElement)) - { - result.EmpType = empTypeElement.GetString(); - Console.WriteLine($"Extracted empType: {result.EmpType}"); - } - - // ดึง orgChild1DnaId - if (jsonDoc.RootElement.TryGetProperty("orgChild1DnaId", out var orgChild1Element)) - { - if (Guid.TryParse(orgChild1Element.GetString(), out var orgChild1Guid)) - { - result.OrgChild1DnaId = orgChild1Guid; - Console.WriteLine($"Extracted orgChild1DnaId: {result.OrgChild1DnaId}"); - } - } - - // ดึง orgChild2DnaId - if (jsonDoc.RootElement.TryGetProperty("orgChild2DnaId", out var orgChild2Element)) - { - if (Guid.TryParse(orgChild2Element.GetString(), out var orgChild2Guid)) - { - result.OrgChild2DnaId = orgChild2Guid; - Console.WriteLine($"Extracted orgChild2DnaId: {result.OrgChild2DnaId}"); - } - } - - // ดึง orgChild3DnaId - if (jsonDoc.RootElement.TryGetProperty("orgChild3DnaId", out var orgChild3Element)) - { - if (Guid.TryParse(orgChild3Element.GetString(), out var orgChild3Guid)) - { - result.OrgChild3DnaId = orgChild3Guid; - Console.WriteLine($"Extracted orgChild3DnaId: {result.OrgChild3DnaId}"); - } - } - - // ดึง orgChild4DnaId - if (jsonDoc.RootElement.TryGetProperty("orgChild4DnaId", out var orgChild4Element)) - { - if (Guid.TryParse(orgChild4Element.GetString(), out var orgChild4Guid)) - { - result.OrgChild4DnaId = orgChild4Guid; - Console.WriteLine($"Extracted orgChild4DnaId: {result.OrgChild4DnaId}"); - } - } - - // ดึง orgRootDnaId - if (jsonDoc.RootElement.TryGetProperty("orgRootDnaId", out var orgRootElement)) - { - if (Guid.TryParse(orgRootElement.GetString(), out var orgRootGuid)) - { - result.OrgRootDnaId = orgRootGuid; - Console.WriteLine($"Extracted orgRootDnaId: {result.OrgRootDnaId}"); - } - } - - // ดึง profileId - if (jsonDoc.RootElement.TryGetProperty("profileId", out var profileIdElement)) - { - if (Guid.TryParse(profileIdElement.GetString(), out var profileIdGuid)) - { - result.ProfileId = profileIdGuid; - Console.WriteLine($"Extracted profileId: {result.ProfileId}"); - } - } - - // ดึง prefix - if (jsonDoc.RootElement.TryGetProperty("prefix", out var prefixElement)) - { - result.Prefix = prefixElement.GetString(); - Console.WriteLine($"Extracted prefix: {result.Prefix}"); - } - - // ดึง name - if (jsonDoc.RootElement.TryGetProperty("name", out var nameElement)) - { - result.Name = nameElement.GetString(); - Console.WriteLine($"Extracted name: {result.Name}"); - } - - return result; - } - catch (Exception ex) - { - Console.WriteLine($"Error extracting token user info: {ex.Message}"); - return defaultResult; - } - } - - protected async Task GetExternalAPIAsync(string apiPath, string accessToken, string apiKey) - { - try - { - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", apiKey); - var _res = await client.GetAsync(apiPath); - if (_res.IsSuccessStatusCode) - { - var _result = await _res.Content.ReadAsStringAsync(); - return _result; - } - return string.Empty; - } - } - catch - { - throw; - } - } - - public async Task GetProfileByKeycloakIdAsync(Guid keycloakId, string? accessToken) - { - try - { - //var apiPath = $"{_configuration["API"]}/org/dotnet/by-keycloak/{keycloakId}"; - var apiPath = $"{_configuration["API"]}/org/dotnet/user-logs/{keycloakId}"; - var apiKey = _configuration["API_KEY"]; - - var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); - if (apiResult != null) - { - var raw = JsonConvert.DeserializeObject(apiResult); - if (raw != null) - return raw.Result; - } - - return null; - } - catch - { - return null; - } - } - - private async Task GetProfileWithCacheAsync(Guid keycloakId, string? accessToken) - { - var cacheKey = keycloakId.ToString(); - - // ตรวจสอบ cache - lock (_profileCache) - { - if (_profileCache.TryGetValue(cacheKey, out var cached)) - { - if (cached.ExpiryTime > DateTime.UtcNow) - { - return cached.Profile; - } - // ลบ cache ที่หมดอายุ - _profileCache.Remove(cacheKey); - } - } - - // ดึงข้อมูลจาก API - try - { - var profile = await GetProfileByKeycloakIdAsync(keycloakId, accessToken); - if (profile != null) - { - // เก็บใน cache - lock (_profileCache) - { - _profileCache[cacheKey] = (profile, DateTime.UtcNow.Add(_cacheExpiry)); - - // ลบ cache เก่าที่เกิน 1000 รายการ - if (_profileCache.Count > 1000) - { - var expiredKeys = _profileCache - .Where(x => x.Value.ExpiryTime < DateTime.UtcNow) - .Select(x => x.Key) - .ToList(); - foreach (var key in expiredKeys) - { - _profileCache.Remove(key); - } - } - } - } - return profile; - } - catch - { - return null; - } - } - - private async Task ReadRequestBodyAsync(HttpContext context) - { - context.Request.EnableBuffering(); - using var reader = new StreamReader(context.Request.Body, leaveOpen: true); - var body = await reader.ReadToEndAsync(); - context.Request.Body.Position = 0; - return body; - } - } - - // Model classes - public class GetProfileByKeycloakIdLocal - { - public Guid Id { get; set; } - public string? Prefix { get; set; } - public string? FirstName { get; set; } - public string? LastName { get; set; } - public string? CitizenId { get; set; } - public string? Root { get; set; } - public string? Child1 { get; set; } - public string? Child2 { get; set; } - public string? Child3 { get; set; } - public string? Child4 { get; set; } - public Guid? RootId { get; set; } - public Guid? Child1Id { get; set; } - public Guid? Child2Id { get; set; } - public Guid? Child3Id { get; set; } - public Guid? Child4Id { get; set; } - public Guid? RootDnaId { get; set; } - public Guid? Child1DnaId { get; set; } - public Guid? Child2DnaId { get; set; } - public Guid? Child3DnaId { get; set; } - public Guid? Child4DnaId { get; set; } - public double? Amount { get; set; } - public double? PositionSalaryAmount { get; set; } - public string? Commander { get; set; } - public Guid? CommanderId { get; set; } - public Guid? CommanderKeycloak { get; set; } - } - - public class GetProfileByKeycloakIdResultLocal - { - public string Message { get; set; } = string.Empty; - public int Status { get; set; } = -1; - public GetProfileByKeycloakIdLocal? Result { get; set; } - } - -} \ No newline at end of file diff --git a/BMA.EHR.Domain/Middlewares/ErrorHandlerMiddleware.cs b/BMA.EHR.Domain/Middlewares/ErrorHandlerMiddleware.cs index 07800ede..4ef7672f 100644 --- a/BMA.EHR.Domain/Middlewares/ErrorHandlerMiddleware.cs +++ b/BMA.EHR.Domain/Middlewares/ErrorHandlerMiddleware.cs @@ -2,260 +2,87 @@ using BMA.EHR.Domain.Shared; using Microsoft.AspNetCore.Http; using System.Net; -using System.Text.Json; namespace BMA.EHR.Domain.Middlewares { public class ErrorHandlerMiddleware { + #region " Fields " + private readonly RequestDelegate _next; + #endregion + + #region " Constructor and Destructor " + public ErrorHandlerMiddleware(RequestDelegate next) { _next = next; } + #endregion + + #region " Methods " + public async Task Invoke(HttpContext context) { - Console.WriteLine("=== ErrorHandlerMiddleware Start ==="); - try { await _next(context); - Console.WriteLine($"Request completed with status: {context.Response.StatusCode}"); - // จัดการ response format หลังจาก request ผ่าน pipeline แล้ว - await FormatResponse(context); - } - catch (ObjectDisposedException) - { - Console.WriteLine("ObjectDisposedException caught in main Invoke"); - return; - } - catch (OperationCanceledException) - { - Console.WriteLine("OperationCanceledException caught in main Invoke"); - return; + var response = context.Response; + + + var responseModel = new ResponseObject(); + responseModel.Status = response.StatusCode; + + if (responseModel.Status == (int)HttpStatusCode.Unauthorized) + { + response.ContentType = "application/json"; + responseModel.Message = GlobalMessages.NotAuthorized; + await response.WriteAsJsonAsync(responseModel); + } + if (responseModel.Status == (int)HttpStatusCode.Forbidden) + { + response.ContentType = "application/json"; + responseModel.Message = GlobalMessages.ForbiddenAccess; + await response.WriteAsJsonAsync(responseModel); + } } catch (Exception error) { - Console.WriteLine($"Exception caught in main Invoke: {error.Message}"); - // จัดการ exception และ format เป็น response - await FormatExceptionResponse(context, error); - } - - Console.WriteLine("=== ErrorHandlerMiddleware End ==="); - } - - private static async Task FormatResponse(HttpContext context) - { - try - { - if (context?.Response == null) - return; - var response = context.Response; - var statusCode = response.StatusCode; + response.ContentType = "application/json"; - // Debug log - Console.WriteLine($"FormatResponse: StatusCode={statusCode}, HasStarted={response.HasStarted}"); - - // จัดการเฉพาะ status code ที่ต้องการ format และ response ยังไม่เริ่ม - if (!response.HasStarted && ShouldFormatResponse(statusCode)) + var responseModel = new ResponseObject(); + responseModel.Status = response.StatusCode; + var msg = error.Message; + var inner = error.InnerException; + while (inner != null) { - Console.WriteLine($"Formatting response for status: {statusCode}"); - - var responseModel = CreateResponseModel(statusCode); - - // Clear และตั้งค่าใหม่ - response.Clear(); - response.StatusCode = statusCode; // เซ็ตกลับไป - response.ContentType = "application/json; charset=utf-8"; - - var jsonResponse = JsonSerializer.Serialize(responseModel); - await response.WriteAsync(jsonResponse); - - Console.WriteLine($"Response formatted successfully: {jsonResponse}"); + msg += $" {inner.Message}\r\n"; + inner = inner.InnerException; } - } - catch (ObjectDisposedException) - { - Console.WriteLine("ObjectDisposedException in FormatResponse"); - } - catch (Exception ex) - { - Console.WriteLine($"Error in FormatResponse: {ex.Message}"); - } - } + responseModel.Result = msg; - private static async Task FormatExceptionResponse(HttpContext context, Exception error) - { - try - { - Console.WriteLine($"FormatExceptionResponse: Error={error.Message}"); - - if (context?.Response == null) - return; - - var response = context.Response; - Console.WriteLine($"Response HasStarted: {response.HasStarted}"); - - if (!response.HasStarted) + switch (response.StatusCode) { - // Clear และตั้งค่า response - response.Clear(); - response.StatusCode = (int)HttpStatusCode.InternalServerError; - response.ContentType = "application/json; charset=utf-8"; - - var responseModel = new ResponseObject - { - Status = response.StatusCode, - Message = GlobalMessages.ExceptionOccured, - Result = GetErrorMessage(error) - }; - - var jsonResponse = JsonSerializer.Serialize(responseModel); - await response.WriteAsync(jsonResponse); - - Console.WriteLine($"Exception response formatted: {jsonResponse}"); + case (int)HttpStatusCode.Unauthorized: + responseModel.Message = GlobalMessages.NotAuthorized; + break; + case (int)HttpStatusCode.Forbidden: + responseModel.Message = GlobalMessages.ForbiddenAccess; + break; + default: + response.StatusCode = (int)HttpStatusCode.InternalServerError; + responseModel.Status = (int)HttpStatusCode.InternalServerError; + responseModel.Message = GlobalMessages.ExceptionOccured; + break; } - else - { - Console.WriteLine("Cannot format exception response - response already started"); - } - } - catch (ObjectDisposedException) - { - Console.WriteLine("ObjectDisposedException in FormatExceptionResponse"); - } - catch (Exception ex) - { - Console.WriteLine($"Error in FormatExceptionResponse: {ex.Message}"); + await response.WriteAsJsonAsync(responseModel); } } - private static bool ShouldFormatResponse(int statusCode) - { - // กำหนด status code ที่ต้องการ format - return statusCode == (int)HttpStatusCode.Unauthorized || - statusCode == (int)HttpStatusCode.Forbidden || - statusCode == (int)HttpStatusCode.BadRequest || - statusCode == (int)HttpStatusCode.NotFound || - statusCode == (int)HttpStatusCode.Conflict || - statusCode == (int)HttpStatusCode.UnprocessableEntity || - statusCode == (int)HttpStatusCode.InternalServerError; // 500 - } - - private static ResponseObject CreateResponseModel(int statusCode) - { - var message = statusCode switch - { - (int)HttpStatusCode.Unauthorized => GlobalMessages.NotAuthorized, - (int)HttpStatusCode.Forbidden => GlobalMessages.ForbiddenAccess, - (int)HttpStatusCode.BadRequest => "Bad Request", - (int)HttpStatusCode.NotFound => "Resource Not Found", - (int)HttpStatusCode.Conflict => "Conflict", - (int)HttpStatusCode.UnprocessableEntity => "Validation Error", - (int)HttpStatusCode.InternalServerError => GlobalMessages.ExceptionOccured, - _ => "Error" - }; - - return new ResponseObject - { - Status = statusCode, - Message = message - }; - } - - private static string GetErrorMessage(Exception error) - { - var msg = error.Message; - var inner = error.InnerException; - while (inner != null) - { - msg += $" {inner.Message}\r\n"; - inner = inner.InnerException; - } - return msg; - } + #endregion } } - - -// using BMA.EHR.Domain.Common; -// using BMA.EHR.Domain.Shared; -// using Microsoft.AspNetCore.Http; -// using System.Net; -// -// namespace BMA.EHR.Domain.Middlewares -// { -// public class ErrorHandlerMiddleware -// { -// private readonly RequestDelegate _next; -// -// public ErrorHandlerMiddleware(RequestDelegate next) -// { -// _next = next; -// } -// -// public async Task Invoke(HttpContext context) -// { -// try -// { -// await _next(context); -// -// var response = context.Response; -// var statusCode = response.StatusCode; -// -// if (!response.HasStarted && -// (statusCode == (int)HttpStatusCode.Unauthorized || statusCode == (int)HttpStatusCode.Forbidden)) -// { -// var responseModel = new ResponseObject -// { -// Status = statusCode, -// Message = statusCode == (int)HttpStatusCode.Unauthorized -// ? GlobalMessages.NotAuthorized -// : GlobalMessages.ForbiddenAccess -// }; -// -// response.ContentType = "application/json"; -// await response.WriteAsJsonAsync(responseModel); -// } -// } -// catch (Exception error) -// { -// var response = context.Response; -// -// if (!response.HasStarted) -// { -// response.Clear(); -// response.ContentType = "application/json"; -// response.StatusCode = (int)HttpStatusCode.InternalServerError; -// -// var msg = error.Message; -// var inner = error.InnerException; -// while (inner != null) -// { -// msg += $" {inner.Message}\r\n"; -// inner = inner.InnerException; -// } -// -// var responseModel = new ResponseObject -// { -// Status = response.StatusCode, -// Message = GlobalMessages.ExceptionOccured, -// Result = msg -// }; -// -// await response.WriteAsJsonAsync(responseModel); -// } -// else -// { -// // logging กรณีที่ response เริ่มถูกส่งแล้ว -// Console.WriteLine("Cannot write error response, stream already started."); -// Console.WriteLine(error); -// } -// } -// } -// } -// } diff --git a/BMA.EHR.Domain/Middlewares/RequestLoggingMiddleware.cs b/BMA.EHR.Domain/Middlewares/RequestLoggingMiddleware.cs index 10f684fb..f84253e7 100644 --- a/BMA.EHR.Domain/Middlewares/RequestLoggingMiddleware.cs +++ b/BMA.EHR.Domain/Middlewares/RequestLoggingMiddleware.cs @@ -1,8 +1,12 @@ -using Microsoft.AspNetCore.Http; +using BMA.EHR.Domain.Models.HR; +using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging.Abstractions; using Nest; using Newtonsoft.Json; +using Serilog; using System.Diagnostics; +using System.IO; using System.Net.Http.Headers; using System.Security.Claims; using System.Text.Encodings.Web; @@ -38,7 +42,7 @@ namespace BMA.EHR.Domain.Middlewares using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", apiKey); + client.DefaultRequestHeaders.Add("api_key", apiKey); var _res = await client.GetAsync(apiPath); if (_res.IsSuccessStatusCode) { @@ -94,7 +98,7 @@ namespace BMA.EHR.Domain.Middlewares string requestBody = await ReadRequestBodyAsync(context); if (requestBody != "") { - if (context.Request.HasFormContentType) + if(context.Request.HasFormContentType) { var form = await context.Request.ReadFormAsync(); // อ่าน form-data @@ -128,8 +132,8 @@ namespace BMA.EHR.Domain.Middlewares requestBodyJson = JsonSerializer.Serialize(JsonSerializer.Deserialize(requestBody), new JsonSerializerOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, WriteIndented = true, Converters = { new DateTimeFixConverter() } }); } } - - + + var originalBodyStream = context.Response.Body; @@ -150,17 +154,6 @@ namespace BMA.EHR.Domain.Middlewares await _next(context); // ดำเนินการต่อไปยัง Middleware อื่น ๆ stopwatch.Stop(); - - - var contentType = context.Response.ContentType; - - var isFileResponse = contentType != null && ( - contentType.StartsWith("application/") || - contentType.StartsWith("image/") || - contentType.StartsWith("audio/") || - context.Response.Headers.ContainsKey("Content-Disposition") - ); - var processTime = stopwatch.ElapsedMilliseconds; var endTime = DateTime.UtcNow; @@ -177,29 +170,12 @@ namespace BMA.EHR.Domain.Middlewares memoryStream.Seek(0, SeekOrigin.Begin); var responseBody = new StreamReader(memoryStream).ReadToEnd(); if (responseBody != "") - { - if (isFileResponse) - { - responseBodyJson = ""; - message = "success"; - } - else - { - responseBodyJson = JsonSerializer.Serialize(JsonSerializer.Deserialize(responseBody), new JsonSerializerOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, WriteIndented = true, Converters = { new DateTimeFixConverter() } }); + responseBodyJson = JsonSerializer.Serialize(JsonSerializer.Deserialize(responseBody), new JsonSerializerOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, WriteIndented = true, Converters = { new DateTimeFixConverter() } }); - var json = JsonSerializer.Deserialize(responseBody); - if (json.ValueKind == JsonValueKind.Array) - { - message = "success"; - } - else - { - if (json.TryGetProperty("message", out var messageElement)) - { - message = messageElement.GetString(); - } - } - } + var json = JsonSerializer.Deserialize(responseBody); + if (json.TryGetProperty("message", out var messageElement)) + { + message = messageElement.GetString(); } var logData = new @@ -247,46 +223,46 @@ namespace BMA.EHR.Domain.Middlewares } } - // public class GetProfileByKeycloakIdLocal - // { - // public Guid Id { get; set; } - // - // public string? Prefix { get; set; } - // public string? FirstName { get; set; } - // public string? LastName { get; set; } - // public string? CitizenId { get; set; } - // - // public string? Root { get; set; } - // public string? Child1 { get; set; } - // public string? Child2 { get; set; } - // public string? Child3 { get; set; } - // public string? Child4 { get; set; } - // public Guid? RootId { get; set; } - // public Guid? Child1Id { get; set; } - // public Guid? Child2Id { get; set; } - // public Guid? Child3Id { get; set; } - // public Guid? Child4Id { get; set; } - // public Guid? RootDnaId { get; set; } - // public Guid? Child1DnaId { get; set; } - // public Guid? Child2DnaId { get; set; } - // public Guid? Child3DnaId { get; set; } - // public Guid? Child4DnaId { get; set; } - // public double? Amount { get; set; } - // public double? PositionSalaryAmount { get; set; } - // public string? Commander { get; set; } - // - // public Guid? CommanderId { get; set; } - // - // public Guid? CommanderKeycloak { get; set; } - // - // } - // - // public class GetProfileByKeycloakIdResultLocal - // { - // public string Message { get; set; } = string.Empty; - // - // public int Status { get; set; } = -1; - // - // public GetProfileByKeycloakIdLocal? Result { get; set; } - // } + public class GetProfileByKeycloakIdLocal + { + public Guid Id { get; set; } + + public string? Prefix { get; set; } + public string? FirstName { get; set; } + public string? LastName { get; set; } + public string? CitizenId { get; set; } + + public string? Root { get; set; } + public string? Child1 { get; set; } + public string? Child2 { get; set; } + public string? Child3 { get; set; } + public string? Child4 { get; set; } + public Guid? RootId { get; set; } + public Guid? Child1Id { get; set; } + public Guid? Child2Id { get; set; } + public Guid? Child3Id { get; set; } + public Guid? Child4Id { get; set; } + public Guid? RootDnaId { get; set; } + public Guid? Child1DnaId { get; set; } + public Guid? Child2DnaId { get; set; } + public Guid? Child3DnaId { get; set; } + public Guid? Child4DnaId { get; set; } + public double? Amount { get; set; } + public double? PositionSalaryAmount { get; set; } + public string? Commander { get; set; } + + public Guid? CommanderId { get; set; } + + public Guid? CommanderKeycloak { get; set; } + + } + + public class GetProfileByKeycloakIdResultLocal + { + public string Message { get; set; } = string.Empty; + + public int Status { get; set; } = -1; + + public GetProfileByKeycloakIdLocal? Result { get; set; } + } } diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint.cs index e67c2c7b..d0bda1f9 100644 --- a/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint.cs +++ b/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint.cs @@ -58,9 +58,6 @@ namespace BMA.EHR.Domain.Models.Discipline [Comment("version หน่วยงาน")] public string? activeId { get; set; } - - [Comment("RootDnaId")] - public Guid? RootDnaId { get; set; } public virtual List DisciplineComplaint_Profiles { get; set; } = new List(); public virtual List DisciplineComplaint_Docs { get; set; } = new List(); public virtual List DisciplineInvestigates { get; set; } = new List(); diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint_Appeal.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint_Appeal.cs index a92ea3b9..7bea750a 100644 --- a/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint_Appeal.cs +++ b/BMA.EHR.Domain/Models/Discipline/DisciplineComplaint_Appeal.cs @@ -47,36 +47,6 @@ namespace BMA.EHR.Domain.Models.Discipline [Comment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)")] public string? profileType { get; set; } - [Comment("ชื่อหน่วยงาน root")] - public string? root { get; set; } - [Comment("id หน่วยงาน root")] - public string? rootId { get; set; } - [Comment("id หน่วยงาน root")] - public string? rootDnaId { get; set; } - [Comment("ชื่อหน่วยงาน child1")] - public string? child1 { get; set; } - [Comment("id หน่วยงาน child1")] - public string? child1Id { get; set; } - [Comment("id หน่วยงาน child1")] - public string? child1DnaId { get; set; } - [Comment("ชื่อหน่วยงาน child2")] - public string? child2 { get; set; } - [Comment("id หน่วยงาน child2")] - public string? child2Id { get; set; } - [Comment("id หน่วยงาน child2")] - public string? child2DnaId { get; set; } - [Comment("ชื่อหน่วยงาน child3")] - public string? child3 { get; set; } - [Comment("id หน่วยงาน child3")] - public string? child3Id { get; set; } - [Comment("id หน่วยงาน child3")] - public string? child3DnaId { get; set; } - [Comment("ชื่อหน่วยงาน child4")] - public string? child4 { get; set; } - [Comment("id หน่วยงาน child4")] - public string? child4Id { get; set; } - [Comment("id หน่วยงาน child4")] - public string? child4DnaId { get; set; } public virtual List DisciplineComplaint_Appeal_Docs { get; set; } = new List(); public virtual List DisciplineComplaint_Appeal_Historys { get; set; } = new List(); diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineDirector.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineDirector.cs index 3f315697..b8deaaaf 100644 --- a/BMA.EHR.Domain/Models/Discipline/DisciplineDirector.cs +++ b/BMA.EHR.Domain/Models/Discipline/DisciplineDirector.cs @@ -27,9 +27,6 @@ namespace BMA.EHR.Domain.Models.Discipline [Comment("คุณวุฒิ")] public string? Qualification { get; set; } = string.Empty; - - [Comment("RootDnaId")] - public Guid? RootDnaId { get; set; } public virtual List DisciplineInvestigate_Directors { get; set; } = new List(); public virtual List DisciplineDisciplinary_DirectorInvestigates { get; set; } = new List(); } diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs index ff0a5ca5..76c277f2 100644 --- a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs +++ b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary.cs @@ -146,9 +146,6 @@ namespace BMA.EHR.Domain.Models.Discipline [Comment("ระดับโทษความผิดกรณีอื่นๆ")] public string? DisciplinaryFaultLevelOther { get; set; } - [Comment("RootDnaId")] - public Guid? RootDnaId { get; set; } - public DisciplineInvestigate DisciplineInvestigate { get; set; } public virtual List DisciplineDisciplinary_ProfileComplaintInvestigates { get; set; } = new List(); public virtual List DisciplineDisciplinary_DocComplaintInvestigates { get; set; } = new List(); diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_ProfileComplaintInvestigate.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_ProfileComplaintInvestigate.cs index 07bad58e..27d1126e 100644 --- a/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_ProfileComplaintInvestigate.cs +++ b/BMA.EHR.Domain/Models/Discipline/DisciplineDisciplinary_ProfileComplaintInvestigate.cs @@ -100,10 +100,6 @@ namespace BMA.EHR.Domain.Models.Discipline [Comment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)")] public string? profileType { get; set; } - [Comment("ฐานความผิดรายบุคคลหมายเหตุ"), Column(TypeName = "text")] - public string? Remark { get; set; } - [Comment("ฐานความผิดรายบุคคล")] - public string? Offense { get; set; } [Required, Comment("Id เรื่องสอบสวน")] public DisciplineDisciplinary DisciplineDisciplinary { get; set; } diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate.cs index de50574e..49b847a5 100644 --- a/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate.cs +++ b/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate.cs @@ -89,9 +89,6 @@ namespace BMA.EHR.Domain.Models.Discipline [Comment("จำนวนวันที่ต้องการขยาย")] public int? InvestigationDaysExtend { get; set; } - - [Comment("RootDnaId")] - public Guid? RootDnaId { get; set; } public DisciplineComplaint DisciplineComplaint { get; set; } public virtual List DisciplineInvestigate_ProfileComplaints { get; set; } = new List(); public virtual List DisciplineInvestigate_DocComplaints { get; set; } = new List(); diff --git a/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate_ProfileComplaint.cs b/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate_ProfileComplaint.cs index 65f85db6..f94f1fa1 100644 --- a/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate_ProfileComplaint.cs +++ b/BMA.EHR.Domain/Models/Discipline/DisciplineInvestigate_ProfileComplaint.cs @@ -81,10 +81,6 @@ namespace BMA.EHR.Domain.Models.Discipline public double? Salary { get; set; } [Comment("ส่งไปยุติเรื่อง")] public string? IsReport { get; set; } = "NEW"; - [Comment("หมายเหตุยุติเรื่อง")] - public string? RemarkReject { get; set; } - [Comment("อ้างอิงรหัสเอกสาร")] - public Document? DocumentReject { get; set; } [Comment("ส่งไปสอบสวน")] public bool? IsDisciplinary { get; set; } = false; [Comment("รายการเก่า")] diff --git a/BMA.EHR.Domain/Models/Insignias/InsigniaManageOrganiation.cs b/BMA.EHR.Domain/Models/Insignias/InsigniaManageOrganiation.cs index a7a2407e..df1d54c2 100644 --- a/BMA.EHR.Domain/Models/Insignias/InsigniaManageOrganiation.cs +++ b/BMA.EHR.Domain/Models/Insignias/InsigniaManageOrganiation.cs @@ -15,7 +15,5 @@ namespace BMA.EHR.Domain.Models.Insignias [Comment("Fk Table InsigniaManage")] public InsigniaManage InsigniaManage { get; set; } public virtual List InsigniaManageProfiles { get; set; } = new List(); - - public Guid? RootDnaId { get; set; } } } diff --git a/BMA.EHR.Domain/Models/Insignias/InsigniaManageProfile.cs b/BMA.EHR.Domain/Models/Insignias/InsigniaManageProfile.cs index 8d11fb15..67589c18 100644 --- a/BMA.EHR.Domain/Models/Insignias/InsigniaManageProfile.cs +++ b/BMA.EHR.Domain/Models/Insignias/InsigniaManageProfile.cs @@ -1,5 +1,9 @@ -using BMA.EHR.Domain.Models.Base; -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; +using BMA.EHR.Domain.Models.Base; +using System.ComponentModel.DataAnnotations.Schema; +using BMA.EHR.Domain.Models.Documents; +using BMA.EHR.Domain.Models.MetaData; namespace BMA.EHR.Domain.Models.Insignias { diff --git a/BMA.EHR.Domain/Models/Insignias/InsigniaReclaimProfile.cs b/BMA.EHR.Domain/Models/Insignias/InsigniaReclaimProfile.cs deleted file mode 100644 index 7c42096b..00000000 --- a/BMA.EHR.Domain/Models/Insignias/InsigniaReclaimProfile.cs +++ /dev/null @@ -1,23 +0,0 @@ -using BMA.EHR.Domain.Models.Base; -using Microsoft.EntityFrameworkCore; - -namespace BMA.EHR.Domain.Models.Insignias -{ - public class InsigniaReclaimProfile : EntityBase - { - [Comment("วันที่เรียกคืน")] - public DateTime? ReclaimDate { get; set; } - - [Comment("เหตุผลในการเรียกคืน")] - public string? ReclaimReason { get; set; } - - [Comment("Fk Table OrganizationOrganization Borrow")] - public Guid? ReclaimOrganizationId { get; set; } - public string? ReclaimOrganization { get; set; } - - [Comment("Fk Table InsigniaNoteProfile")] - public InsigniaNoteProfile InsigniaNoteProfile { get; set; } - - - } -} diff --git a/BMA.EHR.Domain/Models/Insignias/InsigniaRequest.cs b/BMA.EHR.Domain/Models/Insignias/InsigniaRequest.cs index 8c68e267..144a0f4f 100644 --- a/BMA.EHR.Domain/Models/Insignias/InsigniaRequest.cs +++ b/BMA.EHR.Domain/Models/Insignias/InsigniaRequest.cs @@ -25,7 +25,5 @@ namespace BMA.EHR.Domain.Models.Insignias public Document? Document { get; set; } public virtual List RequestProfiles { get; set; } = new List(); - - public string? ProfileType { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Domain/Models/Insignias/InsigniaRequestProfile.cs b/BMA.EHR.Domain/Models/Insignias/InsigniaRequestProfile.cs index 705b808d..32cfdb79 100644 --- a/BMA.EHR.Domain/Models/Insignias/InsigniaRequestProfile.cs +++ b/BMA.EHR.Domain/Models/Insignias/InsigniaRequestProfile.cs @@ -87,28 +87,5 @@ namespace BMA.EHR.Domain.Models.Insignias public Guid? Child4Id { get; set; } public Guid? Child4DnaId { get; set; } public string? Child4 { get; set; } - - public bool? MarkInsignia { get; set; } = false; - - public string? APR1 { get; set; } - - public string? APR2 { get; set; } - - public string? APR3 { get; set; } - - public string? APR4 { get; set; } - - public string? APR5 { get; set; } - - public string? OCT1 { get; set; } - - public string? OCT2 { get; set; } - - public string? OCT3 { get; set; } - - public string? OCT4 { get; set; } - - public string? OCT5 { get; set; } - } } diff --git a/BMA.EHR.Domain/Models/Leave/Requests/LeaveBeginning.cs b/BMA.EHR.Domain/Models/Leave/Requests/LeaveBeginning.cs index 0bb9a1c1..dea7fdc6 100644 --- a/BMA.EHR.Domain/Models/Leave/Requests/LeaveBeginning.cs +++ b/BMA.EHR.Domain/Models/Leave/Requests/LeaveBeginning.cs @@ -10,12 +10,6 @@ namespace BMA.EHR.Domain.Models.Leave.Requests [Required, Comment("รหัส Profile ในระบบทะเบียนประวัติ")] public Guid ProfileId { get; set; } = Guid.Empty; - public string? Prefix { get; set; } = string.Empty; - - public string? FirstName { get; set; } = string.Empty; - - public string? LastName { get; set; } = string.Empty; - [Required, Comment("รหัสประเภทการลา")] public Guid LeaveTypeId { get; set; } = Guid.Empty; @@ -24,29 +18,7 @@ namespace BMA.EHR.Domain.Models.Leave.Requests [Required, Comment("ปีงบประมาณ")] public int LeaveYear { get; set; } = 0; - [Required, Comment("จำนวนวันลาทั้งหมด")] + [Required, Comment("จำนวนวันลา")] public double LeaveDays { get; set; } = 0.0; - - [Comment("จำนวนวันลาที่ใช้ไป")] - public double? LeaveDaysUsed { get; set; } = 0.0; - - [Comment("จำนวนครั้งที่ลาสะสม")] - public int? LeaveCount { get; set; } = 0; - - public Guid? RootDnaId { get; set; } - - public Guid? Child1DnaId { get; set; } - - public Guid? Child2DnaId { get; set; } - - public Guid? Child3DnaId { get; set; } - - public Guid? Child4DnaId { get; set; } - - [Required, Comment("จำนวนวันลายกมา")] - public double BeginningLeaveDays { get; set; } = 0.0; - - [Comment("จำนวนครั้งที่ลายกมา")] - public int BeginningLeaveCount { get; set; } = 0; } } diff --git a/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequest.cs b/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequest.cs index f6c9ce2d..3e3d2ef2 100644 --- a/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequest.cs +++ b/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequest.cs @@ -137,12 +137,9 @@ namespace BMA.EHR.Domain.Models.Leave.Requests [Comment("เขียนที่ (ขอยกเลิก)")] public string? CancelLeaveWrote { get; set; } = string.Empty; - [Comment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")] + [Comment("ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")] public string? LeaveRange { get; set; } = string.Empty; - [Comment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")] - public string? LeaveRangeEnd { get; set; } = string.Empty; - [Comment("เรียนใคร")] public string? Dear { get; set; } = string.Empty; @@ -194,23 +191,5 @@ namespace BMA.EHR.Domain.Models.Leave.Requests public DateTime? BirthDate { get; set; } = DateTime.MinValue; public DateTime? DateAppoint { get; set; } = DateTime.MinValue; - public string? LeaveSubTypeName { get; set; } = string.Empty; - - public string? CommanderPosition { get; set; } = string.Empty; - - public List Approvers { get; set; } = new(); - - public Guid? RootDnaId { get; set; } = Guid.Empty; - - public Guid? Child1DnaId { get; set; } = Guid.Empty; - - public Guid? Child2DnaId { get; set; } = Guid.Empty; - - public Guid? Child3DnaId { get; set; } = Guid.Empty; - - public Guid? Child4DnaId { get; set; } = Guid.Empty; - - public DateTime? DateSendLeave { get; set; } - } } diff --git a/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequestApprover.cs b/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequestApprover.cs deleted file mode 100644 index 0a46c199..00000000 --- a/BMA.EHR.Domain/Models/Leave/Requests/LeaveRequestApprover.cs +++ /dev/null @@ -1,47 +0,0 @@ -using BMA.EHR.Domain.Models.Base; -using Microsoft.EntityFrameworkCore; - -namespace BMA.EHR.Domain.Models.Leave.Requests -{ - public class LeaveRequestApprover: EntityBase - { - public LeaveRequest LeaveRequest { get; set; } - - public int Seq { get; set; } = 0; - - public string Prefix { get; set; } = string.Empty; - - public string FirstName { get; set; } = string.Empty; - - public string LastName { get; set; } = string.Empty; - - public string PositionName { get; set; } = string.Empty; - - [Comment("ประเภทระดับตำแหน่ง")] - public string PositionLevelName { get; set; } = string.Empty; - - [Comment("ตำแหน่งทางการบริหาร")] - public string PosExecutiveName { get; set; } = string.Empty; - - [Comment("สังกัด")] - public string OrganizationName { get; set; } = string.Empty; - - [Comment("ตำแหน่งใต้ลายเช็นต์")] - public string? PositionSign { get; set; } = string.Empty; - - public Guid ProfileId { get; set; } = Guid.Empty; - - public Guid KeycloakId { get; set; } = Guid.Empty; - - public string ApproveStatus { get; set; } = string.Empty; - - public string Comment { get; set; } = string.Empty; - - public string? ApproveType { get; set; } = string.Empty; // ผู้บังคับบัญชา = commander, ผู้มีอำนาจอนุมัติ = Approver - - - public bool IsAct { get; set; } = false; - - public string KeyId { get; set; } = string.Empty; - } -} diff --git a/BMA.EHR.Domain/Models/Leave/TimeAttendants/AdditionalCheckRequest.cs b/BMA.EHR.Domain/Models/Leave/TimeAttendants/AdditionalCheckRequest.cs index af382b45..df5452e3 100644 --- a/BMA.EHR.Domain/Models/Leave/TimeAttendants/AdditionalCheckRequest.cs +++ b/BMA.EHR.Domain/Models/Leave/TimeAttendants/AdditionalCheckRequest.cs @@ -32,23 +32,5 @@ namespace BMA.EHR.Domain.Models.Leave.TimeAttendants public string? FirstName { get; set; } public string? LastName { get; set; } - - - public string? POI { get; set; } = string.Empty; - - public double? Latitude { get; set; } = 0.0; - - public double? Longitude { get; set; } = 0.0; - - public Guid? RootDnaId { get; set; } - - public Guid? Child1DnaId { get; set; } - - public Guid? Child2DnaId { get; set; } - - public Guid? Child3DnaId { get; set; } - - public Guid? Child4DnaId { get; set; } - } } diff --git a/BMA.EHR.Domain/Models/Leave/TimeAttendants/CheckInJobStatus.cs b/BMA.EHR.Domain/Models/Leave/TimeAttendants/CheckInJobStatus.cs deleted file mode 100644 index 922f966b..00000000 --- a/BMA.EHR.Domain/Models/Leave/TimeAttendants/CheckInJobStatus.cs +++ /dev/null @@ -1,39 +0,0 @@ -using BMA.EHR.Domain.Models.Base; -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; - -namespace BMA.EHR.Domain.Models.Leave.TimeAttendants -{ - public class CheckInJobStatus : EntityBase - { - [Required, Comment("Task ID สำหรับติดตามสถานะงาน")] - public Guid TaskId { get; set; } = Guid.Empty; - - [Required, Comment("รหัส User ของ Keycloak")] - public Guid KeycloakUserId { get; set; } = Guid.Empty; - - [Comment("วันเวลาที่สร้างงาน")] - public DateTime CreatedDate { get; set; } = DateTime.Now; - - [Comment("วันเวลาที่เริ่มประมวลผล")] - public DateTime? ProcessingDate { get; set; } - - [Comment("วันเวลาที่เสร็จสิ้นการประมวลผล")] - public DateTime? CompletedDate { get; set; } - - [Required, Comment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED")] - public string Status { get; set; } = "PENDING"; - - [Comment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT")] - public string? CheckType { get; set; } - - [Comment("CheckInId สำหรับ Check-Out")] - public Guid? CheckInId { get; set; } - - [Comment("ข้อความแสดงข้อผิดพลาด")] - public string? ErrorMessage { get; set; } - - [Comment("ข้อมูลเพิ่มเติม (JSON)")] - public string? AdditionalData { get; set; } - } -} diff --git a/BMA.EHR.Domain/Models/Leave/TimeAttendants/LeaveProcessJobStatus.cs b/BMA.EHR.Domain/Models/Leave/TimeAttendants/LeaveProcessJobStatus.cs deleted file mode 100644 index be986189..00000000 --- a/BMA.EHR.Domain/Models/Leave/TimeAttendants/LeaveProcessJobStatus.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; -using BMA.EHR.Domain.Models.Base; -using Microsoft.EntityFrameworkCore; - -namespace BMA.EHR.Domain.Models.Leave.TimeAttendants -{ - public class LeaveProcessJobStatus: EntityBase - { - [Required, Comment("วันเริ่มต้น")] - public DateTime StartDate { get; set; } - - [Required, Comment("วันสิ้นสุด")] - public DateTime EndDate { get; set; } - - [Required, Comment("รหัส Root DNA Id")] - public Guid RootDnaId { get; set; } = Guid.Empty; - - [Comment("วันเวลาที่สร้างงาน")] - public DateTime CreatedDate { get; set; } = DateTime.Now; - - [Comment("วันเวลาที่เริ่มประมวลผล")] - public DateTime? ProcessingDate { get; set; } - - [Comment("วันเวลาที่เสร็จสิ้นการประมวลผล")] - public DateTime? CompletedDate { get; set; } - - [Required, Comment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED")] - public string Status { get; set; } = "PENDING"; - - [Comment("ข้อความแสดงข้อผิดพลาด")] - public string? ErrorMessage { get; set; } - } -} \ No newline at end of file diff --git a/BMA.EHR.Domain/Models/Leave/TimeAttendants/ProcessUserTimeStamp.cs b/BMA.EHR.Domain/Models/Leave/TimeAttendants/ProcessUserTimeStamp.cs index 828a425d..012d1b5f 100644 --- a/BMA.EHR.Domain/Models/Leave/TimeAttendants/ProcessUserTimeStamp.cs +++ b/BMA.EHR.Domain/Models/Leave/TimeAttendants/ProcessUserTimeStamp.cs @@ -104,16 +104,5 @@ namespace BMA.EHR.Domain.Models.Leave.TimeAttendants public Guid? ProfileId { get; set; } public string? ProfileType { get; set; } - - - public Guid? RootDnaId { get; set; } - - public Guid? Child1DnaId { get; set; } - - public Guid? Child2DnaId { get; set; } - - public Guid? Child3DnaId { get; set; } - - public Guid? Child4DnaId { get; set; } } } diff --git a/BMA.EHR.Domain/Models/Leave/TimeAttendants/UserDutyTime.cs b/BMA.EHR.Domain/Models/Leave/TimeAttendants/UserDutyTime.cs index 3103cbc8..7dfc1ecd 100644 --- a/BMA.EHR.Domain/Models/Leave/TimeAttendants/UserDutyTime.cs +++ b/BMA.EHR.Domain/Models/Leave/TimeAttendants/UserDutyTime.cs @@ -21,16 +21,6 @@ namespace BMA.EHR.Domain.Models.Leave.TimeAttendants public bool IsProcess { get; set; } = false; [Comment("หมายเหตุ")] - public string? Remark { get; set; } - - public Guid? RootDnaId { get; set; } - - public Guid? Child1DnaId { get; set; } - - public Guid? Child2DnaId { get; set; } - - public Guid? Child3DnaId { get; set; } - - public Guid? Child4DnaId { get; set; } + public string? Remark { get; set; } } } diff --git a/BMA.EHR.Domain/Models/Leave/TimeAttendants/UserTimeStamp.cs b/BMA.EHR.Domain/Models/Leave/TimeAttendants/UserTimeStamp.cs index 6e791707..62af46c9 100644 --- a/BMA.EHR.Domain/Models/Leave/TimeAttendants/UserTimeStamp.cs +++ b/BMA.EHR.Domain/Models/Leave/TimeAttendants/UserTimeStamp.cs @@ -92,15 +92,5 @@ namespace BMA.EHR.Domain.Models.Leave.TimeAttendants public Guid? ProfileId { get; set; } public string? ProfileType { get; set; } - - public Guid? RootDnaId { get; set; } - - public Guid? Child1DnaId { get; set; } - - public Guid? Child2DnaId { get; set; } - - public Guid? Child3DnaId { get; set; } - - public Guid? Child4DnaId { get; set; } } } diff --git a/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs b/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs index 474dcb69..ebe94d91 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs @@ -119,10 +119,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? position { get; set; } [Comment("ตำแหน่งทางการบริหาร")] public string? PositionExecutive { get; set; } - - [Comment("id ตำแหน่งทางการบริหาร")] - public string? posExecutiveId { get; set; } - [Comment("id ประเภทตำแหน่ง")] public string? posTypeId { get; set; } [Comment("ชื่อประเภทตำแหน่ง")] @@ -183,15 +179,6 @@ namespace BMA.EHR.Domain.Models.Placement [Comment("ประเภทคำสั่ง")] public string? typeCommand { get; set; } - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } - // public OrgEmployee? OrgEmployee { get; set; } // public PositionEmployeeStatus? PositionEmployeeStatus { get; set; } // public PositionEmployeeLine? PositionEmployeeLine { get; set; } diff --git a/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs b/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs index 26ad3d66..129c96b9 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs @@ -109,14 +109,5 @@ namespace BMA.EHR.Domain.Models.Placement [Comment("เลขที่คำสั่ง")] public string? commandNo { get; set; } - - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } } } diff --git a/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs b/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs index c660c8ca..597ec658 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementProfile.cs @@ -189,7 +189,7 @@ namespace BMA.EHR.Domain.Models.Placement [Comment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย")] public string? OccupationGroup { get; set; } [Comment("ตำแหน่งปัจจุบัน เงินเดือน")] - public double? OccupationSalary { get; set; } + public int? OccupationSalary { get; set; } [Comment("ตำแหน่งปัจจุบัน สังกัด")] public string? OccupationPosition { get; set; } [Comment("ตำแหน่งปัจจุบัน ประเภทราชการ")] @@ -321,10 +321,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? positionName { get; set; } [Comment("ตำแหน่งทางการบริหาร")] public string? PositionExecutive { get; set; } - - [Comment("id ตำแหน่งทางการบริหาร")] - public string? posExecutiveId { get; set; } - [Comment("สายงาน")] public string? positionField { get; set; } [Comment("id ประเภทตำแหน่ง")] @@ -415,15 +411,6 @@ namespace BMA.EHR.Domain.Models.Placement [Comment("Id รูปโปรไฟล์")] public virtual Document? ProfileImg { get; set; } - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } - public virtual List PlacementProfileDocs { get; set; } = new List(); public virtual List PlacementCertificates { get; set; } = new List(); public virtual List PlacementEducations { get; set; } = new List(); diff --git a/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs b/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs index 3b1b625c..85b2bd47 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs @@ -64,10 +64,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? profileId { get; set; } [Comment("คำนำหน้า")] public string? prefix { get; set; } - - [Comment("ยศ")] - public string? rank { get; set; } - [Comment("ชื่อ")] public string? firstName { get; set; } [Comment("นามสกุล")] @@ -132,10 +128,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? position { get; set; } [Comment("ตำแหน่งทางการบริหาร")] public string? PositionExecutive { get; set; } - - [Comment("id ตำแหน่งทางการบริหาร")] - public string? posExecutiveId { get; set; } - [Comment("id ประเภทตำแหน่ง")] public string? posTypeId { get; set; } [Comment("ชื่อประเภทตำแหน่ง")] @@ -192,14 +184,6 @@ namespace BMA.EHR.Domain.Models.Placement [Comment("สถานะการใช้งาน")] public bool IsActive { get; set; } = true; - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } public virtual List PlacementReceiveDocs { get; set; } = new List(); } } diff --git a/BMA.EHR.Domain/Models/Placement/PlacementRepatriation.cs b/BMA.EHR.Domain/Models/Placement/PlacementRepatriation.cs index c08fe684..39b2a7ba 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementRepatriation.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementRepatriation.cs @@ -103,13 +103,5 @@ namespace BMA.EHR.Domain.Models.Placement public string? posLevelNameOld { get; set; } [Comment("Id อ้างอิงช่วยราช")] public Guid? refId { get; set; } - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } } } diff --git a/BMA.EHR.Domain/Models/Placement/PlacementTransfer.cs b/BMA.EHR.Domain/Models/Placement/PlacementTransfer.cs index 58f7505e..5f770d73 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementTransfer.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementTransfer.cs @@ -98,14 +98,6 @@ namespace BMA.EHR.Domain.Models.Placement public string? posLevelOldId { get; set; } [Comment("ชื่อระดับตำแหน่ง old")] public string? posLevelNameOld { get; set; } - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } public virtual List PlacementTransferDocs { get; set; } = new List(); } } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementDeceased.cs b/BMA.EHR.Domain/Models/Retirement/RetirementDeceased.cs index ed9b5500..62e627c2 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementDeceased.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementDeceased.cs @@ -97,16 +97,6 @@ namespace BMA.EHR.Domain.Models.Retirement [Comment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)")] public string? profileType { get; set; } - - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } - public virtual List RetirementDeceasedNotis { get; set; } = new List(); } } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementDeceasedNoti.cs b/BMA.EHR.Domain/Models/Retirement/RetirementDeceasedNoti.cs index 03ff6172..741d3fd1 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementDeceasedNoti.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementDeceasedNoti.cs @@ -37,10 +37,10 @@ namespace BMA.EHR.Domain.Models.Retirement public bool IsSendNotification { get; set; } = true; [Comment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง")] - public string? OrganizationName { get; set; } = string.Empty; + public string OrganizationName { get; set; } = string.Empty; [Comment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง")] - public string? PositionName { get; set; } = string.Empty; + public string PositionName { get; set; } = string.Empty; [Comment("Fk Table Document")] public Document? Document { get; set; } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementEmployeeQuestion.cs b/BMA.EHR.Domain/Models/Retirement/RetirementEmployeeQuestion.cs deleted file mode 100644 index 7f36467f..00000000 --- a/BMA.EHR.Domain/Models/Retirement/RetirementEmployeeQuestion.cs +++ /dev/null @@ -1,104 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; -using BMA.EHR.Domain.Models.Base; -using System.ComponentModel.DataAnnotations.Schema; -using BMA.EHR.Domain.Models.Documents; -using BMA.EHR.Domain.Models.MetaData; - -namespace BMA.EHR.Domain.Models.Retirement -{ - public class RetirementEmployeeQuestion : EntityBase - { - [Comment("รอบการลาออก")] - public RetirementResignEmployee RetirementResignEmployee { get; set; } - [Comment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร")] - public string? ReasonWork { get; set; } - [Comment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร")] - public string? ReasonWorkOther { get; set; } - [Comment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด")] - public int? TimeThink { get; set; } - [Comment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ")] - public string? ExitFactor { get; set; } - [Comment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ")] - public string? ExitFactorOther { get; set; } - [Comment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง")] - public string? Adjust { get; set; } - [Comment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง")] - public string? AdjustOther { get; set; } - [Comment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร")] - public string? RealReason { get; set; } - [Comment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร")] - public string? NotExitFactor { get; set; } - [Comment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร")] - public bool? Havejob { get; set; } - [Comment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร")] - public string? HavejobReason { get; set; } - [Comment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่")] - public bool? SuggestFriends { get; set; } - [Comment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่")] - public string? SuggestFriendsReason { get; set; } - [Comment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่")] - public bool? FutureWork { get; set; } - [Comment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่")] - public string? FutureWorkReason { get; set; } - [Comment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ ")] - public string? Suggestion { get; set; } - [Comment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก")] - public DateTime? AppointDate { get; set; } - - [Comment("คะแนนข้อ 1")] - public int? Score1 { get; set; } - [Comment("คะแนนข้อ 2")] - public int? Score2 { get; set; } - [Comment("คะแนนข้อ 3")] - public int? Score3 { get; set; } - [Comment("คะแนนข้อ 4")] - public int? Score4 { get; set; } - [Comment("คะแนนข้อ 5")] - public int? Score5 { get; set; } - [Comment("คะแนนข้อ 6")] - public int? Score6 { get; set; } - [Comment("คะแนนข้อ 7")] - public int? Score7 { get; set; } - [Comment("คะแนนข้อ 8")] - public int? Score8 { get; set; } - [Comment("คะแนนข้อ 9")] - public int? Score9 { get; set; } - [Comment("คะแนนข้อ 10")] - public int? Score10 { get; set; } - [Comment("คะแนนรวม")] - public int? ScoreTotal { get; set; } - [Comment("ความคิดเห็น")] - public string? Comment { get; set; } - [Comment("ชื่อหน่วยงาน root ")] - public string? root { get; set; } - [Comment("id หน่วยงาน root ")] - public string? rootId { get; set; } - [Comment("id หน่วยงาน root ")] - public string? rootDnaId { get; set; } - [Comment("ชื่อหน่วยงาน child1 ")] - public string? child1 { get; set; } - [Comment("id หน่วยงาน child1 ")] - public string? child1Id { get; set; } - [Comment("id หน่วยงาน child1 ")] - public string? child1DnaId { get; set; } - [Comment("ชื่อหน่วยงาน child2 ")] - public string? child2 { get; set; } - [Comment("id หน่วยงาน child2 ")] - public string? child2Id { get; set; } - [Comment("id หน่วยงาน child2 ")] - public string? child2DnaId { get; set; } - [Comment("ชื่อหน่วยงาน child3 ")] - public string? child3 { get; set; } - [Comment("id หน่วยงาน child3 ")] - public string? child3Id { get; set; } - [Comment("id หน่วยงาน child3 ")] - public string? child3DnaId { get; set; } - [Comment("ชื่อหน่วยงาน child4 ")] - public string? child4 { get; set; } - [Comment("id หน่วยงาน child4 ")] - public string? child4Id { get; set; } - [Comment("id หน่วยงาน child4 ")] - public string? child4DnaId { get; set; } - } -} diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs b/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs index c1f69ece..cf74ebe0 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs @@ -173,10 +173,6 @@ namespace BMA.EHR.Domain.Models.Retirement public string? position { get; set; } [Comment("ตำแหน่งทางการบริหาร")] public string? PositionExecutive { get; set; } - - [Comment("id ตำแหน่งทางการบริหาร")] - public string? posExecutiveId { get; set; } - [Comment("id ประเภทตำแหน่ง")] public string? posTypeId { get; set; } [Comment("ชื่อประเภทตำแหน่ง")] @@ -185,14 +181,6 @@ namespace BMA.EHR.Domain.Models.Retirement public string? posLevelId { get; set; } [Comment("ชื่อระดับตำแหน่ง")] public string? posLevelName { get; set; } - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } public virtual List RetirementOtherDocs { get; set; } = new List(); } } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementOut.cs b/BMA.EHR.Domain/Models/Retirement/RetirementOut.cs index e50a4bf9..1a3013bf 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementOut.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementOut.cs @@ -103,14 +103,5 @@ namespace BMA.EHR.Domain.Models.Retirement [Comment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)")] public string? profileType { get; set; } - - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } } } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementProfile.cs b/BMA.EHR.Domain/Models/Retirement/RetirementProfile.cs index 8f8d2208..7951476e 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementProfile.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementProfile.cs @@ -87,14 +87,5 @@ namespace BMA.EHR.Domain.Models.Retirement public string? posExecutiveName { get; set; } [Comment("เลขที่ตำแหน่ง ")] public string? posNo { get; set; } - - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } } } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementQuestion.cs b/BMA.EHR.Domain/Models/Retirement/RetirementQuestion.cs index 89f15e6f..77e71620 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementQuestion.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementQuestion.cs @@ -70,35 +70,5 @@ namespace BMA.EHR.Domain.Models.Retirement public int? ScoreTotal { get; set; } [Comment("ความคิดเห็น")] public string? Comment { get; set; } - [Comment("ชื่อหน่วยงาน root ")] - public string? root { get; set; } - [Comment("id หน่วยงาน root ")] - public string? rootId { get; set; } - [Comment("id หน่วยงาน root ")] - public string? rootDnaId { get; set; } - [Comment("ชื่อหน่วยงาน child1 ")] - public string? child1 { get; set; } - [Comment("id หน่วยงาน child1 ")] - public string? child1Id { get; set; } - [Comment("id หน่วยงาน child1 ")] - public string? child1DnaId { get; set; } - [Comment("ชื่อหน่วยงาน child2 ")] - public string? child2 { get; set; } - [Comment("id หน่วยงาน child2 ")] - public string? child2Id { get; set; } - [Comment("id หน่วยงาน child2 ")] - public string? child2DnaId { get; set; } - [Comment("ชื่อหน่วยงาน child3 ")] - public string? child3 { get; set; } - [Comment("id หน่วยงาน child3 ")] - public string? child3Id { get; set; } - [Comment("id หน่วยงาน child3 ")] - public string? child3DnaId { get; set; } - [Comment("ชื่อหน่วยงาน child4 ")] - public string? child4 { get; set; } - [Comment("id หน่วยงาน child4 ")] - public string? child4Id { get; set; } - [Comment("id หน่วยงาน child4 ")] - public string? child4DnaId { get; set; } } } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementRawProfile.cs b/BMA.EHR.Domain/Models/Retirement/RetirementRawProfile.cs index 299bf29f..e8242dd1 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementRawProfile.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementRawProfile.cs @@ -76,15 +76,5 @@ namespace BMA.EHR.Domain.Models.Retirement public string? posExecutiveName { get; set; } [Comment("เลขที่ตำแหน่ง ")] public string? posNo { get; set; } - - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } - } } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementResign.cs b/BMA.EHR.Domain/Models/Retirement/RetirementResign.cs index f748de84..312c297c 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementResign.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementResign.cs @@ -151,22 +151,7 @@ namespace BMA.EHR.Domain.Models.Retirement [Comment("ชื่อระดับตำแหน่ง old")] public string? posLevelNameOld { get; set; } - [Comment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")] - public string? ApproveStep { get; set; } = string.Empty; - [Comment("คนยื่นมาอยู่ในกลุ่ม")] - public string? Group { get; set; } = string.Empty; - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } - - - public List Approvers { get; set; } = new(); public virtual List RetirementResignDocs { get; set; } = new List(); public virtual List RetirementResignDebtDocs { get; set; } = new List(); public virtual List RetirementResignCancels { get; set; } = new List(); diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementResignApprover.cs b/BMA.EHR.Domain/Models/Retirement/RetirementResignApprover.cs deleted file mode 100644 index bf1a156a..00000000 --- a/BMA.EHR.Domain/Models/Retirement/RetirementResignApprover.cs +++ /dev/null @@ -1,33 +0,0 @@ -using BMA.EHR.Domain.Models.Base; -namespace BMA.EHR.Domain.Models.Retirement - -{ - public class RetirementResignApprover : EntityBase - { - public RetirementResign RetirementResign { get; set; } - - public int Seq { get; set; } = 0; - - public string Prefix { get; set; } = string.Empty; - - public string FirstName { get; set; } = string.Empty; - - public string LastName { get; set; } = string.Empty; - - public string PositionName { get; set; } = string.Empty; - - public string PositionExecutiveName { get; set; } = string.Empty; - - public Guid ProfileId { get; set; } = Guid.Empty; - - public Guid KeycloakId { get; set; } = Guid.Empty; - - public string ApproveStatus { get; set; } = string.Empty; - - public string Comment { get; set; } = string.Empty; - public string Org { get; set; } = string.Empty; - public DateTime? RejectDate { get; set; } - - public string? ApproveType { get; set; } = string.Empty; // ผู้บังคับบัญชา = commander, ผู้มีอำนาจอนุมัติ = Approver - } -} diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementResignCancel.cs b/BMA.EHR.Domain/Models/Retirement/RetirementResignCancel.cs index ebee38e7..f7f519de 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementResignCancel.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementResignCancel.cs @@ -130,32 +130,7 @@ namespace BMA.EHR.Domain.Models.Retirement public string? posLevelOldId { get; set; } [Comment("ชื่อระดับตำแหน่ง old")] public string? posLevelNameOld { get; set; } - - [Comment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")] - public string? ApproveStep { get; set; } = string.Empty; - [Comment("คนยื่นมาอยู่ในกลุ่ม")] - public string? Group { get; set; } = string.Empty; [Required, Comment("อ้างอิงรับย้าย")] public virtual RetirementResign RetirementResign { get; set; } - - [Comment("ด้านทางการบริหาร")] - public string? positionExecutiveField { get; set; } - [Comment("ด้าน/สาขา")] - public string? positionArea { get; set; } - [Comment("ด้านทางการบริหาร (เก่า)")] - public string? positionExecutiveFieldOld { get; set; } - [Comment("ด้าน/สาขา (เก่า)")] - public string? positionAreaOld { get; set; } - [Comment("id หน่วยงาน root old")] - public string? rootDnaOldId { get; set; } - [Comment("id หน่วยงาน child1 old")] - public string? child1DnaOldId { get; set; } - [Comment("id หน่วยงาน child2 old")] - public string? child2DnaOldId { get; set; } - [Comment("id หน่วยงาน child3 old")] - public string? child3DnaOldId { get; set; } - [Comment("id หน่วยงาน child4 old")] - public string? child4DnaOldId { get; set; } - public List Approvers { get; set; } = new(); } } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementResignCancelApprover.cs b/BMA.EHR.Domain/Models/Retirement/RetirementResignCancelApprover.cs deleted file mode 100644 index 7a8b25e6..00000000 --- a/BMA.EHR.Domain/Models/Retirement/RetirementResignCancelApprover.cs +++ /dev/null @@ -1,31 +0,0 @@ -using BMA.EHR.Domain.Models.Base; -namespace BMA.EHR.Domain.Models.Retirement - -{ - public class RetirementResignCancelApprover : EntityBase - { - public RetirementResignCancel RetirementResignCancel { get; set; } - - public int Seq { get; set; } = 0; - - public string Prefix { get; set; } = string.Empty; - - public string FirstName { get; set; } = string.Empty; - - public string LastName { get; set; } = string.Empty; - - public string PositionName { get; set; } = string.Empty; - - public Guid ProfileId { get; set; } = Guid.Empty; - - public Guid KeycloakId { get; set; } = Guid.Empty; - - public string ApproveStatus { get; set; } = string.Empty; - - public string Comment { get; set; } = string.Empty; - public string Org { get; set; } = string.Empty; - public DateTime? RejectDate { get; set; } - - public string? ApproveType { get; set; } = string.Empty; // ผู้บังคับบัญชา = commander, ผู้มีอำนาจอนุมัติ = Approver - } -} diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployee.cs b/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployee.cs index d9ecc721..09d4faca 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployee.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployee.cs @@ -149,13 +149,7 @@ namespace BMA.EHR.Domain.Models.Retirement [Comment("ชื่อระดับตำแหน่ง old")] public string? posLevelNameOld { get; set; } - [Comment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")] - public string? ApproveStep { get; set; } = string.Empty; - [Comment("คนยื่นมาอยู่ในกลุ่ม")] - public string? Group { get; set; } = string.Empty; - - public List Approvers { get; set; } = new(); public virtual List RetirementResignEmployeeDocs { get; set; } = new List(); public virtual List RetirementResignEmployeeDebtDocs { get; set; } = new List(); public virtual List RetirementResignEmployeeCancels { get; set; } = new List(); diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployeeApprover.cs b/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployeeApprover.cs deleted file mode 100644 index b7ae7b6b..00000000 --- a/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployeeApprover.cs +++ /dev/null @@ -1,33 +0,0 @@ -using BMA.EHR.Domain.Models.Base; -namespace BMA.EHR.Domain.Models.Retirement - -{ - public class RetirementResignEmployeeApprover : EntityBase - { - public RetirementResignEmployee RetirementResignEmployee { get; set; } - - public int Seq { get; set; } = 0; - - public string Prefix { get; set; } = string.Empty; - - public string FirstName { get; set; } = string.Empty; - - public string LastName { get; set; } = string.Empty; - - public string PositionName { get; set; } = string.Empty; - - public string PositionExecutiveName { get; set; } = string.Empty; - - public Guid ProfileId { get; set; } = Guid.Empty; - - public Guid KeycloakId { get; set; } = Guid.Empty; - - public string ApproveStatus { get; set; } = string.Empty; - - public string Comment { get; set; } = string.Empty; - public string Org { get; set; } = string.Empty; - public DateTime? RejectDate { get; set; } - - public string? ApproveType { get; set; } = string.Empty; // ผู้บังคับบัญชา = commander, ผู้มีอำนาจอนุมัติ = Approver - } -} diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployeeCancel.cs b/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployeeCancel.cs index ad21aba4..54be28ce 100644 --- a/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployeeCancel.cs +++ b/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployeeCancel.cs @@ -128,23 +128,7 @@ namespace BMA.EHR.Domain.Models.Retirement public string? posLevelOldId { get; set; } [Comment("ชื่อระดับตำแหน่ง old")] public string? posLevelNameOld { get; set; } - - [Comment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")] - public string? ApproveStep { get; set; } = string.Empty; - [Comment("คนยื่นมาอยู่ในกลุ่ม")] - public string? Group { get; set; } = string.Empty; - [Comment("id หน่วยงาน root old")] - public string? rootDnaOldId { get; set; } - [Comment("id หน่วยงาน child1 old")] - public string? child1DnaOldId { get; set; } - [Comment("id หน่วยงาน child2 old")] - public string? child2DnaOldId { get; set; } - [Comment("id หน่วยงาน child3 old")] - public string? child3DnaOldId { get; set; } - [Comment("id หน่วยงาน child4 old")] - public string? child4DnaOldId { get; set; } [Required, Comment("อ้างอิงรับย้าย")] public virtual RetirementResignEmployee RetirementResignEmployee { get; set; } - public List Approvers { get; set; } = new(); } } diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployeeCancelApprover.cs b/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployeeCancelApprover.cs deleted file mode 100644 index 6d952cb0..00000000 --- a/BMA.EHR.Domain/Models/Retirement/RetirementResignEmployeeCancelApprover.cs +++ /dev/null @@ -1,31 +0,0 @@ -using BMA.EHR.Domain.Models.Base; -namespace BMA.EHR.Domain.Models.Retirement - -{ - public class RetirementResignEmployeeCancelApprover : EntityBase - { - public RetirementResignEmployeeCancel RetirementResignEmployeeCancel { get; set; } - - public int Seq { get; set; } = 0; - - public string Prefix { get; set; } = string.Empty; - - public string FirstName { get; set; } = string.Empty; - - public string LastName { get; set; } = string.Empty; - - public string PositionName { get; set; } = string.Empty; - - public Guid ProfileId { get; set; } = Guid.Empty; - - public Guid KeycloakId { get; set; } = Guid.Empty; - - public string ApproveStatus { get; set; } = string.Empty; - - public string Comment { get; set; } = string.Empty; - public string Org { get; set; } = string.Empty; - public DateTime? RejectDate { get; set; } - - public string? ApproveType { get; set; } = string.Empty; // ผู้บังคับบัญชา = commander, ผู้มีอำนาจอนุมัติ = Approver - } -} diff --git a/BMA.EHR.Domain/ModelsExam/Candidate/Candidate.cs b/BMA.EHR.Domain/ModelsExam/Candidate/Candidate.cs index 48636365..497e38b5 100644 --- a/BMA.EHR.Domain/ModelsExam/Candidate/Candidate.cs +++ b/BMA.EHR.Domain/ModelsExam/Candidate/Candidate.cs @@ -267,7 +267,7 @@ namespace BMA.EHR.Domain.ModelsExam.Candidate [Comment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย")] public string? OccupationGroup { get; set; } [Comment("ตำแหน่งปัจจุบัน เงินเดือน")] - public double? OccupationSalary { get; set; } + public int? OccupationSalary { get; set; } [Comment("ตำแหน่งปัจจุบัน สังกัด")] public string? OccupationPosition { get; set; } [Comment("ตำแหน่งปัจจุบัน ประเภทราชการ")] diff --git a/BMA.EHR.Domain/ModelsExam/Candidate/PositionExam.cs b/BMA.EHR.Domain/ModelsExam/Candidate/PositionExam.cs index 1c80a714..0ac079b3 100644 --- a/BMA.EHR.Domain/ModelsExam/Candidate/PositionExam.cs +++ b/BMA.EHR.Domain/ModelsExam/Candidate/PositionExam.cs @@ -33,8 +33,5 @@ namespace BMA.EHR.Domain.ModelsExam.Candidate [Comment("รหัสประจำตำแหน่งที่สอบ")] public string? Code { get; set; } - - [Comment("ขีดจำกัดวุฒิการศึกษา")] - public string? EducationLevel { get; set; } } } diff --git a/BMA.EHR.Domain/Shared/GlobalMessages.cs b/BMA.EHR.Domain/Shared/GlobalMessages.cs index a99dc3c9..f93fd712 100644 --- a/BMA.EHR.Domain/Shared/GlobalMessages.cs +++ b/BMA.EHR.Domain/Shared/GlobalMessages.cs @@ -8,8 +8,6 @@ public static readonly string DataNotFound = "ไม่พบข้อมูลในระบบ"; - public static readonly string ProfileNotFound = "ไม่พบข้อมูลในระบบทะเบียนประวัติ"; - public static readonly string NotAuthorized = "กรุณาเข้าสู่ระบบก่อนใช้งาน!"; public static readonly string ForbiddenAccess = "คุณไม่ได้รับอนุญาติให้เข้าใช้งาน!"; @@ -93,17 +91,8 @@ public static readonly string InsigniaManageOrgLimit = "จำนวนการจัดสรรเครื่องราชฯ หน่วยงานเกินจำนวน"; public static readonly string InsigniaBorrowOrgLimit = "จำนวนการจัดสรรเครื่องราชฯ หน่วยงานเกินจำนวนของหน่วยงานที่ได้รับ"; public static readonly string InsigniaNoBorrow = "ไม่สามารถยืมเครื่องราชฯ นี้ได้เนื่องจากสถานะรอการบันทึกข้อมูล"; - - public static readonly string InsigniaNoReclaim = "ไม่สามารถเรียกคืนเครื่องราชฯ นี้ได้เนื่องจากสถานะรอการบันทึกข้อมูล"; - public static readonly string InsigniaReclaimNotFound = "ไม่พบรายการเรียกคืนเครื่องราชฯ ที่ระบุ"; - - public static readonly string InsigniaBorrowNotFound = "ไม่พบรายการยืมเครื่องราชฯ"; public static readonly string InsigniaNotReturn = "รายการยืมเครื่องราชฯ นี้ได้ทำการยืมไว้แล้ว"; - - - public static readonly string CalculateTypeNotValid = "ประเภทผู้ขอพระราชทานเครื่องราชฯ ไม่ถูกต้อง กรุณาตรวจสอบข้อมูล"; - #endregion #region " Retirement " diff --git a/BMA.EHR.Domain/Shared/PrivilegeConverter.cs b/BMA.EHR.Domain/Shared/PrivilegeConverter.cs deleted file mode 100644 index 59f8168c..00000000 --- a/BMA.EHR.Domain/Shared/PrivilegeConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Newtonsoft.Json; - -namespace BMA.EHR.Domain.Shared -{ - public class PrivilegeConverter : JsonConverter -{ - public override bool CanConvert(Type objectType) - { - return objectType == typeof(string); - } - - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == JsonToken.Null) - { - return "EMPTY"; - } - return reader.Value; - } - - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value); - } -} -} \ No newline at end of file diff --git a/BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj b/BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj index b3370a5e..9bae0b2e 100644 --- a/BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj +++ b/BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj @@ -1,44 +1,41 @@  - - net6.0 - enable - enable - false - $(NoWarn);$(WarningsNotAsErrors) + + net6.0 + enable + enable + - + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - + + + - - - - - - - PreserveNewest - - + + + PreserveNewest + + diff --git a/BMA.EHR.Infrastructure/InfrastructureServiceRegistration.cs b/BMA.EHR.Infrastructure/InfrastructureServiceRegistration.cs index deee6910..36ba47ef 100644 --- a/BMA.EHR.Infrastructure/InfrastructureServiceRegistration.cs +++ b/BMA.EHR.Infrastructure/InfrastructureServiceRegistration.cs @@ -20,6 +20,8 @@ namespace BMA.EHR.Infrastructure public static IServiceCollection AddLeavePersistence(this IServiceCollection services, IConfiguration configuration) { + + // leave db context var connectionStringLeave = configuration.GetConnectionString("LeaveConnection"); @@ -29,10 +31,6 @@ namespace BMA.EHR.Infrastructure { b.MigrationsAssembly(typeof(LeaveDbContext).Assembly.FullName); b.MigrationsHistoryTable("__LeaveMigrationsHistory"); - b.EnableRetryOnFailure( - maxRetryCount: 5, - maxRetryDelay: System.TimeSpan.FromSeconds(30), - errorNumbersToAdd: null); }), ServiceLifetime.Transient); @@ -45,6 +43,8 @@ namespace BMA.EHR.Infrastructure public static IServiceCollection AddDisciplinePersistence(this IServiceCollection services, IConfiguration configuration) { + + // discipline db context var connectionStringDiscipline = configuration.GetConnectionString("DisciplineConnection"); @@ -54,10 +54,7 @@ namespace BMA.EHR.Infrastructure { b.MigrationsAssembly(typeof(DisciplineDbContext).Assembly.FullName); b.MigrationsHistoryTable("__DisciplineMigrationsHistory"); - b.EnableRetryOnFailure( - maxRetryCount: 5, - maxRetryDelay: System.TimeSpan.FromSeconds(30), - errorNumbersToAdd: null); + }), ServiceLifetime.Transient); @@ -70,6 +67,8 @@ namespace BMA.EHR.Infrastructure IConfiguration configuration) { services.AddTransient(); + + var connectionString = configuration.GetConnectionString("DefaultConnection"); services.AddDbContext(options => @@ -78,14 +77,9 @@ namespace BMA.EHR.Infrastructure { b.MigrationsAssembly(typeof(ApplicationDBContext).Assembly.FullName); b.MigrationsHistoryTable("__EHRMigrationsHistory"); - b.EnableRetryOnFailure( - maxRetryCount: 5, - maxRetryDelay: System.TimeSpan.FromSeconds(30), - errorNumbersToAdd: null); }), ServiceLifetime.Transient); - services.AddTransient(provider => provider.GetService()); @@ -97,10 +91,6 @@ namespace BMA.EHR.Infrastructure { b.MigrationsAssembly(typeof(ApplicationDBExamContext).Assembly.FullName); b.MigrationsHistoryTable("__EHRMigrationsHistory"); - b.EnableRetryOnFailure( - maxRetryCount: 5, - maxRetryDelay: System.TimeSpan.FromSeconds(30), - errorNumbersToAdd: null); }), ServiceLifetime.Transient); diff --git a/BMA.EHR.Infrastructure/MessageQueue/RabbitMQConsumer.cs b/BMA.EHR.Infrastructure/MessageQueue/RabbitMQConsumer.cs index 98e95fbe..97a3670b 100644 --- a/BMA.EHR.Infrastructure/MessageQueue/RabbitMQConsumer.cs +++ b/BMA.EHR.Infrastructure/MessageQueue/RabbitMQConsumer.cs @@ -16,9 +16,11 @@ namespace BMA.EHR.Infrastructure.MessageQueue { #region " Fields " + private readonly UserProfileRepository _userProfileRepository; + private readonly InsigniaPeriodsRepository _insigniaPeriodsRepository; private readonly IHttpContextAccessor _httpContextAccessor; private const string INSIGNIA_QUEUE = "bma_insignia_request"; - + private readonly IServiceScopeFactory _serviceScopeFactory; private readonly IConfiguration _configuration; private IConnection _connection; @@ -28,29 +30,33 @@ namespace BMA.EHR.Infrastructure.MessageQueue #region " Constructor and Destructor " - public RabbitMQConsumer(IHttpContextAccessor httpContextAccessor, + public RabbitMQConsumer(UserProfileRepository userProfileRepository, + InsigniaPeriodsRepository insigniaPeriodsRepository, + IHttpContextAccessor httpContextAccessor, IServiceScopeFactory serviceScopeFactory, IConfiguration configuration) { _serviceScopeFactory = serviceScopeFactory; _configuration = configuration; + _userProfileRepository = userProfileRepository; + _insigniaPeriodsRepository = insigniaPeriodsRepository; _httpContextAccessor = httpContextAccessor; - + var host = _configuration["RabbitMQ:URL"]; var userName = _configuration["RabbitMQ:UserName"]; var password = _configuration["RabbitMQ:Password"]; - + var factory = new ConnectionFactory() { HostName = host, UserName = userName, Password = password }; - + _connection = factory.CreateConnection(); _channel = _connection.CreateModel(); _channel.QueueDeclare(queue: INSIGNIA_QUEUE, durable: false, exclusive: false, autoDelete: false, arguments: null); - + } public override void Dispose() @@ -79,19 +85,19 @@ namespace BMA.EHR.Infrastructure.MessageQueue var userRepo = scope.ServiceProvider.GetRequiredService(); var insigniaRepo = scope.ServiceProvider.GetRequiredService(); - var selectPeriod = await insigniaRepo.GetByIdAsync(periodId); + var selectPeriod = await _insigniaPeriodsRepository.GetByIdAsync(periodId); if (selectPeriod == null) { throw new Exception(GlobalMessages.InsigniaPeriodNotFound); } - + var organizations = await userRepo.GetActiveRootAsync(AccessToken, selectPeriod.RevisionId); - + foreach (var organization in organizations) { if (organization == null) continue; - + var result = await insigniaRepo.GetInsigniaRequest(periodId, organization.Id); if (result != null) { diff --git a/BMA.EHR.Infrastructure/Migrations/20250405091100_update_table_placementRepatriation_add_refId1.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250405091100_update_table_placementRepatriation_add_refId1.Designer.cs deleted file mode 100644 index 287e3aad..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250405091100_update_table_placementRepatriation_add_refId1.Designer.cs +++ /dev/null @@ -1,20074 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250405091100_update_table_placementRepatriation_add_refId1")] - partial class update_table_placementRepatriation_add_refId1 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250405091100_update_table_placementRepatriation_add_refId1.cs b/BMA.EHR.Infrastructure/Migrations/20250405091100_update_table_placementRepatriation_add_refId1.cs deleted file mode 100644 index 24c563f1..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250405091100_update_table_placementRepatriation_add_refId1.cs +++ /dev/null @@ -1,82 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_table_placementRepatriation_add_refId1 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "PositionName", - table: "RetirementDeceasedNotis", - type: "longtext", - nullable: true, - comment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง", - oldClrType: typeof(string), - oldType: "longtext", - oldComment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "OrganizationName", - table: "RetirementDeceasedNotis", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง", - oldClrType: typeof(string), - oldType: "longtext", - oldComment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "RetirementDeceasedNotis", - keyColumn: "PositionName", - keyValue: null, - column: "PositionName", - value: ""); - - migrationBuilder.AlterColumn( - name: "PositionName", - table: "RetirementDeceasedNotis", - type: "longtext", - nullable: false, - comment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง", - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true, - oldComment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "RetirementDeceasedNotis", - keyColumn: "OrganizationName", - keyValue: null, - column: "OrganizationName", - value: ""); - - migrationBuilder.AlterColumn( - name: "OrganizationName", - table: "RetirementDeceasedNotis", - type: "longtext", - nullable: false, - comment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง", - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true, - oldComment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250417083557_update_table_disciplineresult_add_remark.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250417083557_update_table_disciplineresult_add_remark.Designer.cs deleted file mode 100644 index 7c551ef4..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250417083557_update_table_disciplineresult_add_remark.Designer.cs +++ /dev/null @@ -1,20074 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250417083557_update_table_disciplineresult_add_remark")] - partial class update_table_disciplineresult_add_remark - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250417083557_update_table_disciplineresult_add_remark.cs b/BMA.EHR.Infrastructure/Migrations/20250417083557_update_table_disciplineresult_add_remark.cs deleted file mode 100644 index ab559bec..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250417083557_update_table_disciplineresult_add_remark.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_table_disciplineresult_add_remark : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250507030357_Add InsigniaReclaimProfile Table.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250507030357_Add InsigniaReclaimProfile Table.Designer.cs deleted file mode 100644 index 80f60d7e..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250507030357_Add InsigniaReclaimProfile Table.Designer.cs +++ /dev/null @@ -1,20157 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250507030357_Add InsigniaReclaimProfile Table")] - partial class AddInsigniaReclaimProfileTable - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250507030357_Add InsigniaReclaimProfile Table.cs b/BMA.EHR.Infrastructure/Migrations/20250507030357_Add InsigniaReclaimProfile Table.cs deleted file mode 100644 index 55f3f1de..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250507030357_Add InsigniaReclaimProfile Table.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class AddInsigniaReclaimProfileTable : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "InsigniaReclaimProfiles", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), - CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), - LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - ReclaimDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันที่เรียกคืน"), - ReclaimReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลในการเรียกคืน") - .Annotation("MySql:CharSet", "utf8mb4"), - ReclaimOrganizationId = table.Column(type: "char(36)", nullable: true, comment: "Fk Table OrganizationOrganization Borrow", collation: "ascii_general_ci"), - ReclaimOrganization = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - InsigniaNoteProfileId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_InsigniaReclaimProfiles", x => x.Id); - table.ForeignKey( - name: "FK_InsigniaReclaimProfiles_InsigniaNoteProfiles_InsigniaNotePro~", - column: x => x.InsigniaNoteProfileId, - principalTable: "InsigniaNoteProfiles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_InsigniaReclaimProfiles_InsigniaNoteProfileId", - table: "InsigniaReclaimProfiles", - column: "InsigniaNoteProfileId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "InsigniaReclaimProfiles"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250507065811_update_table_retirement_add_approver.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250507065811_update_table_retirement_add_approver.Designer.cs deleted file mode 100644 index 0129f5b5..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250507065811_update_table_retirement_add_approver.Designer.cs +++ /dev/null @@ -1,20595 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250507065811_update_table_retirement_add_approver")] - partial class update_table_retirement_add_approver - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250507065811_update_table_retirement_add_approver.cs b/BMA.EHR.Infrastructure/Migrations/20250507065811_update_table_retirement_add_approver.cs deleted file mode 100644 index 816d2ddb..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250507065811_update_table_retirement_add_approver.cs +++ /dev/null @@ -1,259 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_table_retirement_add_approver : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ApproveStep", - table: "RetirementResigns", - type: "longtext", - nullable: true, - comment: "step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "ApproveStep", - table: "RetirementResignEmployees", - type: "longtext", - nullable: true, - comment: "step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RetirementResignApprovers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), - CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), - LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - RetirementResignId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Seq = table.Column(type: "int", nullable: false), - Prefix = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - PositionName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProfileId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - KeycloakId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApproveStatus = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Comment = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ApproveType = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RetirementResignApprovers", x => x.Id); - table.ForeignKey( - name: "FK_RetirementResignApprovers_RetirementResigns_RetirementResign~", - column: x => x.RetirementResignId, - principalTable: "RetirementResigns", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RetirementResignCancelApprovers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), - CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), - LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - RetirementResignCancelId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Seq = table.Column(type: "int", nullable: false), - Prefix = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - PositionName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProfileId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - KeycloakId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApproveStatus = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Comment = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ApproveType = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RetirementResignCancelApprovers", x => x.Id); - table.ForeignKey( - name: "FK_RetirementResignCancelApprovers_RetirementResignCancels_Reti~", - column: x => x.RetirementResignCancelId, - principalTable: "RetirementResignCancels", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RetirementResignEmployeeApprovers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), - CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), - LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - RetirementResignEmployeeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Seq = table.Column(type: "int", nullable: false), - Prefix = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - PositionName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProfileId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - KeycloakId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApproveStatus = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Comment = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ApproveType = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RetirementResignEmployeeApprovers", x => x.Id); - table.ForeignKey( - name: "FK_RetirementResignEmployeeApprovers_RetirementResignEmployees_~", - column: x => x.RetirementResignEmployeeId, - principalTable: "RetirementResignEmployees", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RetirementResignEmployeeCancelApprovers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), - CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), - LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - RetirementResignEmployeeCancelId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Seq = table.Column(type: "int", nullable: false), - Prefix = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - PositionName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProfileId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - KeycloakId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApproveStatus = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Comment = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ApproveType = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RetirementResignEmployeeCancelApprovers", x => x.Id); - table.ForeignKey( - name: "FK_RetirementResignEmployeeCancelApprovers_RetirementResignEmpl~", - column: x => x.RetirementResignEmployeeCancelId, - principalTable: "RetirementResignEmployeeCancels", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_RetirementResignApprovers_RetirementResignId", - table: "RetirementResignApprovers", - column: "RetirementResignId"); - - migrationBuilder.CreateIndex( - name: "IX_RetirementResignCancelApprovers_RetirementResignCancelId", - table: "RetirementResignCancelApprovers", - column: "RetirementResignCancelId"); - - migrationBuilder.CreateIndex( - name: "IX_RetirementResignEmployeeApprovers_RetirementResignEmployeeId", - table: "RetirementResignEmployeeApprovers", - column: "RetirementResignEmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_RetirementResignEmployeeCancelApprovers_RetirementResignEmpl~", - table: "RetirementResignEmployeeCancelApprovers", - column: "RetirementResignEmployeeCancelId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "RetirementResignApprovers"); - - migrationBuilder.DropTable( - name: "RetirementResignCancelApprovers"); - - migrationBuilder.DropTable( - name: "RetirementResignEmployeeApprovers"); - - migrationBuilder.DropTable( - name: "RetirementResignEmployeeCancelApprovers"); - - migrationBuilder.DropColumn( - name: "ApproveStep", - table: "RetirementResigns"); - - migrationBuilder.DropColumn( - name: "ApproveStep", - table: "RetirementResignEmployees"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250507095828_update_table_retirement_add_approver_date.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250507095828_update_table_retirement_add_approver_date.Designer.cs deleted file mode 100644 index 3a64f0e9..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250507095828_update_table_retirement_add_approver_date.Designer.cs +++ /dev/null @@ -1,20601 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250507095828_update_table_retirement_add_approver_date")] - partial class update_table_retirement_add_approver_date - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250507095828_update_table_retirement_add_approver_date.cs b/BMA.EHR.Infrastructure/Migrations/20250507095828_update_table_retirement_add_approver_date.cs deleted file mode 100644 index 596fbd5a..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250507095828_update_table_retirement_add_approver_date.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_table_retirement_add_approver_date : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "RejectDate", - table: "RetirementResignEmployeeApprovers", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "RejectDate", - table: "RetirementResignApprovers", - type: "datetime(6)", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "RejectDate", - table: "RetirementResignEmployeeApprovers"); - - migrationBuilder.DropColumn( - name: "RejectDate", - table: "RetirementResignApprovers"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250507101317_update_table_retirement_add_approver_date1.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250507101317_update_table_retirement_add_approver_date1.Designer.cs deleted file mode 100644 index 453638cc..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250507101317_update_table_retirement_add_approver_date1.Designer.cs +++ /dev/null @@ -1,20609 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250507101317_update_table_retirement_add_approver_date1")] - partial class update_table_retirement_add_approver_date1 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250507101317_update_table_retirement_add_approver_date1.cs b/BMA.EHR.Infrastructure/Migrations/20250507101317_update_table_retirement_add_approver_date1.cs deleted file mode 100644 index 7569869a..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250507101317_update_table_retirement_add_approver_date1.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_table_retirement_add_approver_date1 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Org", - table: "RetirementResignEmployeeApprovers", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Org", - table: "RetirementResignApprovers", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Org", - table: "RetirementResignEmployeeApprovers"); - - migrationBuilder.DropColumn( - name: "Org", - table: "RetirementResignApprovers"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250515023219_Add MarkInsignia Field.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250515023219_Add MarkInsignia Field.Designer.cs deleted file mode 100644 index 0669eb2e..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250515023219_Add MarkInsignia Field.Designer.cs +++ /dev/null @@ -1,20612 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250515023219_Add MarkInsignia Field")] - partial class AddMarkInsigniaField - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250515023219_Add MarkInsignia Field.cs b/BMA.EHR.Infrastructure/Migrations/20250515023219_Add MarkInsignia Field.cs deleted file mode 100644 index 46463555..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250515023219_Add MarkInsignia Field.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class AddMarkInsigniaField : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "MarkInsignia", - table: "InsigniaRequestProfiles", - type: "tinyint(1)", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "MarkInsignia", - table: "InsigniaRequestProfiles"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250519034501_Add Migration For Insignia and Leave.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250519034501_Add Migration For Insignia and Leave.Designer.cs deleted file mode 100644 index 4be43479..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250519034501_Add Migration For Insignia and Leave.Designer.cs +++ /dev/null @@ -1,20642 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250519034501_Add Migration For Insignia and Leave")] - partial class AddMigrationForInsigniaandLeave - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250519034501_Add Migration For Insignia and Leave.cs b/BMA.EHR.Infrastructure/Migrations/20250519034501_Add Migration For Insignia and Leave.cs deleted file mode 100644 index b7c496a7..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250519034501_Add Migration For Insignia and Leave.cs +++ /dev/null @@ -1,128 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class AddMigrationForInsigniaandLeave : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "APR1", - table: "InsigniaRequestProfiles", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "APR2", - table: "InsigniaRequestProfiles", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "APR3", - table: "InsigniaRequestProfiles", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "APR4", - table: "InsigniaRequestProfiles", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "APR5", - table: "InsigniaRequestProfiles", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "OCT1", - table: "InsigniaRequestProfiles", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "OCT2", - table: "InsigniaRequestProfiles", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "OCT3", - table: "InsigniaRequestProfiles", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "OCT4", - table: "InsigniaRequestProfiles", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "OCT5", - table: "InsigniaRequestProfiles", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "APR1", - table: "InsigniaRequestProfiles"); - - migrationBuilder.DropColumn( - name: "APR2", - table: "InsigniaRequestProfiles"); - - migrationBuilder.DropColumn( - name: "APR3", - table: "InsigniaRequestProfiles"); - - migrationBuilder.DropColumn( - name: "APR4", - table: "InsigniaRequestProfiles"); - - migrationBuilder.DropColumn( - name: "APR5", - table: "InsigniaRequestProfiles"); - - migrationBuilder.DropColumn( - name: "OCT1", - table: "InsigniaRequestProfiles"); - - migrationBuilder.DropColumn( - name: "OCT2", - table: "InsigniaRequestProfiles"); - - migrationBuilder.DropColumn( - name: "OCT3", - table: "InsigniaRequestProfiles"); - - migrationBuilder.DropColumn( - name: "OCT4", - table: "InsigniaRequestProfiles"); - - migrationBuilder.DropColumn( - name: "OCT5", - table: "InsigniaRequestProfiles"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250523034727_update_table_retirementresign_add_group.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250523034727_update_table_retirementresign_add_group.Designer.cs deleted file mode 100644 index e1028213..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250523034727_update_table_retirementresign_add_group.Designer.cs +++ /dev/null @@ -1,20650 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250523034727_update_table_retirementresign_add_group")] - partial class update_table_retirementresign_add_group - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250523034727_update_table_retirementresign_add_group.cs b/BMA.EHR.Infrastructure/Migrations/20250523034727_update_table_retirementresign_add_group.cs deleted file mode 100644 index 562fe5ee..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250523034727_update_table_retirementresign_add_group.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_table_retirementresign_add_group : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Group", - table: "RetirementResigns", - type: "longtext", - nullable: true, - comment: "คนยื่นมาอยู่ในกลุ่ม") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Group", - table: "RetirementResignEmployees", - type: "longtext", - nullable: true, - comment: "คนยื่นมาอยู่ในกลุ่ม") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Group", - table: "RetirementResigns"); - - migrationBuilder.DropColumn( - name: "Group", - table: "RetirementResignEmployees"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250527123821_update_table_retirementresignemp_add_group.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250527123821_update_table_retirementresignemp_add_group.Designer.cs deleted file mode 100644 index 3fda80d5..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250527123821_update_table_retirementresignemp_add_group.Designer.cs +++ /dev/null @@ -1,20680 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250527123821_update_table_retirementresignemp_add_group")] - partial class update_table_retirementresignemp_add_group - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250527123821_update_table_retirementresignemp_add_group.cs b/BMA.EHR.Infrastructure/Migrations/20250527123821_update_table_retirementresignemp_add_group.cs deleted file mode 100644 index d89e9f5b..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250527123821_update_table_retirementresignemp_add_group.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_table_retirementresignemp_add_group : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ApproveStep", - table: "RetirementResignEmployeeCancels", - type: "longtext", - nullable: true, - comment: "step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Group", - table: "RetirementResignEmployeeCancels", - type: "longtext", - nullable: true, - comment: "คนยื่นมาอยู่ในกลุ่ม") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Org", - table: "RetirementResignEmployeeCancelApprovers", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "RejectDate", - table: "RetirementResignEmployeeCancelApprovers", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "ApproveStep", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Group", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "คนยื่นมาอยู่ในกลุ่ม") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Org", - table: "RetirementResignCancelApprovers", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "RejectDate", - table: "RetirementResignCancelApprovers", - type: "datetime(6)", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ApproveStep", - table: "RetirementResignEmployeeCancels"); - - migrationBuilder.DropColumn( - name: "Group", - table: "RetirementResignEmployeeCancels"); - - migrationBuilder.DropColumn( - name: "Org", - table: "RetirementResignEmployeeCancelApprovers"); - - migrationBuilder.DropColumn( - name: "RejectDate", - table: "RetirementResignEmployeeCancelApprovers"); - - migrationBuilder.DropColumn( - name: "ApproveStep", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "Group", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "Org", - table: "RetirementResignCancelApprovers"); - - migrationBuilder.DropColumn( - name: "RejectDate", - table: "RetirementResignCancelApprovers"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250529062132_Add ProfileType To InsigniaRequest.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250529062132_Add ProfileType To InsigniaRequest.Designer.cs deleted file mode 100644 index a887d45f..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250529062132_Add ProfileType To InsigniaRequest.Designer.cs +++ /dev/null @@ -1,20683 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250529062132_Add ProfileType To InsigniaRequest")] - partial class AddProfileTypeToInsigniaRequest - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250529062132_Add ProfileType To InsigniaRequest.cs b/BMA.EHR.Infrastructure/Migrations/20250529062132_Add ProfileType To InsigniaRequest.cs deleted file mode 100644 index bb67406b..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250529062132_Add ProfileType To InsigniaRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class AddProfileTypeToInsigniaRequest : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ProfileType", - table: "InsigniaRequests", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ProfileType", - table: "InsigniaRequests"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250616073836_Add Field Placement and Retire.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250616073836_Add Field Placement and Retire.Designer.cs deleted file mode 100644 index 2af1f0f2..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250616073836_Add Field Placement and Retire.Designer.cs +++ /dev/null @@ -1,20891 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250616073836_Add Field Placement and Retire")] - partial class AddFieldPlacementandRetire - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250616073836_Add Field Placement and Retire.cs b/BMA.EHR.Infrastructure/Migrations/20250616073836_Add Field Placement and Retire.cs deleted file mode 100644 index b2647f8e..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250616073836_Add Field Placement and Retire.cs +++ /dev/null @@ -1,642 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class AddFieldPlacementandRetire : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "positionArea", - table: "RetirementResigns", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "RetirementResigns", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "RetirementResigns", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "RetirementResigns", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "RetirementRawProfiles", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "RetirementRawProfiles", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "RetirementRawProfiles", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "RetirementRawProfiles", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "RetirementProfiles", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "RetirementProfiles", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "RetirementProfiles", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "RetirementProfiles", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "RetirementOuts", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "RetirementOuts", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "RetirementOuts", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "RetirementOuts", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "RetirementOthers", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "RetirementOthers", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "RetirementOthers", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "RetirementOthers", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "RetirementDeceaseds", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "RetirementDeceaseds", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "RetirementDeceaseds", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "RetirementDeceaseds", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "PlacementTransfers", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "PlacementTransfers", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "PlacementTransfers", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "PlacementTransfers", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "PlacementRepatriations", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "PlacementRepatriations", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "PlacementRepatriations", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "PlacementRepatriations", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "PlacementReceives", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "PlacementReceives", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "PlacementReceives", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "PlacementReceives", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "PlacementProfiles", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "PlacementProfiles", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "PlacementProfiles", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "PlacementProfiles", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "PlacementOfficers", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "PlacementOfficers", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "PlacementOfficers", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "PlacementOfficers", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionArea", - table: "PlacementAppointments", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionAreaOld", - table: "PlacementAppointments", - type: "longtext", - nullable: true, - comment: "ด้าน/สาขา (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveField", - table: "PlacementAppointments", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "positionExecutiveFieldOld", - table: "PlacementAppointments", - type: "longtext", - nullable: true, - comment: "ด้านทางการบริหาร (เก่า)") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "positionArea", - table: "RetirementResigns"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "RetirementResigns"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "RetirementResigns"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "RetirementResigns"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "RetirementRawProfiles"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "RetirementRawProfiles"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "RetirementRawProfiles"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "RetirementRawProfiles"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "RetirementProfiles"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "RetirementProfiles"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "RetirementProfiles"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "RetirementProfiles"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "RetirementOuts"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "RetirementOuts"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "RetirementOuts"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "RetirementOuts"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "RetirementOthers"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "RetirementOthers"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "RetirementOthers"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "RetirementOthers"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "RetirementDeceaseds"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "RetirementDeceaseds"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "RetirementDeceaseds"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "RetirementDeceaseds"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "PlacementTransfers"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "PlacementTransfers"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "PlacementTransfers"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "PlacementTransfers"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "PlacementRepatriations"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "PlacementRepatriations"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "PlacementRepatriations"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "PlacementRepatriations"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "PlacementReceives"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "PlacementReceives"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "PlacementReceives"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "PlacementReceives"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "PlacementProfiles"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "PlacementProfiles"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "PlacementProfiles"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "PlacementProfiles"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "PlacementOfficers"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "PlacementOfficers"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "PlacementOfficers"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "PlacementOfficers"); - - migrationBuilder.DropColumn( - name: "positionArea", - table: "PlacementAppointments"); - - migrationBuilder.DropColumn( - name: "positionAreaOld", - table: "PlacementAppointments"); - - migrationBuilder.DropColumn( - name: "positionExecutiveField", - table: "PlacementAppointments"); - - migrationBuilder.DropColumn( - name: "positionExecutiveFieldOld", - table: "PlacementAppointments"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250619180137_update_table_discipline_add_dna.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250619180137_update_table_discipline_add_dna.Designer.cs deleted file mode 100644 index 8f7a7a35..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250619180137_update_table_discipline_add_dna.Designer.cs +++ /dev/null @@ -1,21235 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250619180137_update_table_discipline_add_dna")] - partial class update_table_discipline_add_dna - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementEmployeeQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany() - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250619180137_update_table_discipline_add_dna.cs b/BMA.EHR.Infrastructure/Migrations/20250619180137_update_table_discipline_add_dna.cs deleted file mode 100644 index 7e9e9839..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250619180137_update_table_discipline_add_dna.cs +++ /dev/null @@ -1,428 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_table_discipline_add_dna : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "child1DnaOldId", - table: "RetirementResignEmployeeCancels", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child1 old") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child2DnaOldId", - table: "RetirementResignEmployeeCancels", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child2 old") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child3DnaOldId", - table: "RetirementResignEmployeeCancels", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child3 old") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child4DnaOldId", - table: "RetirementResignEmployeeCancels", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child4 old") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "rootDnaOldId", - table: "RetirementResignEmployeeCancels", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน root old") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child1DnaOldId", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child1 old") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child2DnaOldId", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child2 old") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child3DnaOldId", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child3 old") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child4DnaOldId", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child4 old") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "rootDnaOldId", - table: "RetirementResignCancels", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน root old") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child1", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงาน child1 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child1DnaId", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child1 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child1Id", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child1 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child2", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงาน child2 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child2DnaId", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child2 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child2Id", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child2 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child3", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงาน child3 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child3DnaId", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child3 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child3Id", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child3 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child4", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงาน child4 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child4DnaId", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child4 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child4Id", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child4 ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "root", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงาน root ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "rootDnaId", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน root ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "rootId", - table: "RetirementQuestions", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน root ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RetirementEmployeeQuestions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), - CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), - LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - RetirementResignEmployeeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ReasonWork = table.Column(type: "longtext", nullable: true, comment: "เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร") - .Annotation("MySql:CharSet", "utf8mb4"), - ReasonWorkOther = table.Column(type: "longtext", nullable: true, comment: "อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร") - .Annotation("MySql:CharSet", "utf8mb4"), - TimeThink = table.Column(type: "int", nullable: true, comment: "สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"), - ExitFactor = table.Column(type: "longtext", nullable: true, comment: "ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ") - .Annotation("MySql:CharSet", "utf8mb4"), - ExitFactorOther = table.Column(type: "longtext", nullable: true, comment: "อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ") - .Annotation("MySql:CharSet", "utf8mb4"), - Adjust = table.Column(type: "longtext", nullable: true, comment: "อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง") - .Annotation("MySql:CharSet", "utf8mb4"), - AdjustOther = table.Column(type: "longtext", nullable: true, comment: "อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง") - .Annotation("MySql:CharSet", "utf8mb4"), - RealReason = table.Column(type: "longtext", nullable: true, comment: "โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร") - .Annotation("MySql:CharSet", "utf8mb4"), - NotExitFactor = table.Column(type: "longtext", nullable: true, comment: "ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร") - .Annotation("MySql:CharSet", "utf8mb4"), - Havejob = table.Column(type: "tinyint(1)", nullable: true, comment: "ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"), - HavejobReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร") - .Annotation("MySql:CharSet", "utf8mb4"), - SuggestFriends = table.Column(type: "tinyint(1)", nullable: true, comment: "ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"), - SuggestFriendsReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่") - .Annotation("MySql:CharSet", "utf8mb4"), - FutureWork = table.Column(type: "tinyint(1)", nullable: true, comment: "หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"), - FutureWorkReason = table.Column(type: "longtext", nullable: true, comment: "เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่") - .Annotation("MySql:CharSet", "utf8mb4"), - Suggestion = table.Column(type: "longtext", nullable: true, comment: "ความคิดเห็นและข้อเสนอแนะอื่น ๆ ") - .Annotation("MySql:CharSet", "utf8mb4"), - AppointDate = table.Column(type: "datetime(6)", nullable: true, comment: "กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"), - Score1 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 1"), - Score2 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 2"), - Score3 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 3"), - Score4 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 4"), - Score5 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 5"), - Score6 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 6"), - Score7 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 7"), - Score8 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 8"), - Score9 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 9"), - Score10 = table.Column(type: "int", nullable: true, comment: "คะแนนข้อ 10"), - ScoreTotal = table.Column(type: "int", nullable: true, comment: "คะแนนรวม"), - Comment = table.Column(type: "longtext", nullable: true, comment: "ความคิดเห็น") - .Annotation("MySql:CharSet", "utf8mb4"), - root = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root ") - .Annotation("MySql:CharSet", "utf8mb4"), - rootId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน root ") - .Annotation("MySql:CharSet", "utf8mb4"), - rootDnaId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน root ") - .Annotation("MySql:CharSet", "utf8mb4"), - child1 = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child1Id = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child1 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child1DnaId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child1 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child2 = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child2Id = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child2 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child2DnaId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child2 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child3 = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child3Id = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child3 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child3DnaId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child3 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child4 = table.Column(type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child4Id = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child4 ") - .Annotation("MySql:CharSet", "utf8mb4"), - child4DnaId = table.Column(type: "longtext", nullable: true, comment: "id หน่วยงาน child4 ") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RetirementEmployeeQuestions", x => x.Id); - table.ForeignKey( - name: "FK_RetirementEmployeeQuestions_RetirementResignEmployees_Retire~", - column: x => x.RetirementResignEmployeeId, - principalTable: "RetirementResignEmployees", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_RetirementEmployeeQuestions_RetirementResignEmployeeId", - table: "RetirementEmployeeQuestions", - column: "RetirementResignEmployeeId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "RetirementEmployeeQuestions"); - - migrationBuilder.DropColumn( - name: "child1DnaOldId", - table: "RetirementResignEmployeeCancels"); - - migrationBuilder.DropColumn( - name: "child2DnaOldId", - table: "RetirementResignEmployeeCancels"); - - migrationBuilder.DropColumn( - name: "child3DnaOldId", - table: "RetirementResignEmployeeCancels"); - - migrationBuilder.DropColumn( - name: "child4DnaOldId", - table: "RetirementResignEmployeeCancels"); - - migrationBuilder.DropColumn( - name: "rootDnaOldId", - table: "RetirementResignEmployeeCancels"); - - migrationBuilder.DropColumn( - name: "child1DnaOldId", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "child2DnaOldId", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "child3DnaOldId", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "child4DnaOldId", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "rootDnaOldId", - table: "RetirementResignCancels"); - - migrationBuilder.DropColumn( - name: "child1", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child1DnaId", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child1Id", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child2", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child2DnaId", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child2Id", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child3", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child3DnaId", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child3Id", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child4", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child4DnaId", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "child4Id", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "root", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "rootDnaId", - table: "RetirementQuestions"); - - migrationBuilder.DropColumn( - name: "rootId", - table: "RetirementQuestions"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250725070319_update_table_RetirementResignApprover&RetirementResignEmployeeApprover_add_field_PositionExecutiveName.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20250725070319_update_table_RetirementResignApprover&RetirementResignEmployeeApprover_add_field_PositionExecutiveName.Designer.cs deleted file mode 100644 index d6859e87..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250725070319_update_table_RetirementResignApprover&RetirementResignEmployeeApprover_add_field_PositionExecutiveName.Designer.cs +++ /dev/null @@ -1,21243 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20250725070319_update_table_RetirementResignApprover&RetirementResignEmployeeApprover_add_field_PositionExecutiveName")] - partial class update_table_RetirementResignApproverRetirementResignEmployeeApprover_add_field_PositionExecutiveName - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("int") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementEmployeeQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany() - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20250725070319_update_table_RetirementResignApprover&RetirementResignEmployeeApprover_add_field_PositionExecutiveName.cs b/BMA.EHR.Infrastructure/Migrations/20250725070319_update_table_RetirementResignApprover&RetirementResignEmployeeApprover_add_field_PositionExecutiveName.cs deleted file mode 100644 index 91d4cd55..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20250725070319_update_table_RetirementResignApprover&RetirementResignEmployeeApprover_add_field_PositionExecutiveName.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_table_RetirementResignApproverRetirementResignEmployeeApprover_add_field_PositionExecutiveName : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "PositionExecutiveName", - table: "RetirementResignEmployeeApprovers", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "PositionExecutiveName", - table: "RetirementResignApprovers", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "PositionExecutiveName", - table: "RetirementResignEmployeeApprovers"); - - migrationBuilder.DropColumn( - name: "PositionExecutiveName", - table: "RetirementResignApprovers"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20251117105514_update_table_PlacementProfile_and_Candidate.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20251117105514_update_table_PlacementProfile_and_Candidate.Designer.cs deleted file mode 100644 index f654d687..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20251117105514_update_table_PlacementProfile_and_Candidate.Designer.cs +++ /dev/null @@ -1,21243 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20251117105514_update_table_PlacementProfile_and_Candidate")] - partial class update_table_PlacementProfile_and_Candidate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("double") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementEmployeeQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany() - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20251117105514_update_table_PlacementProfile_and_Candidate.cs b/BMA.EHR.Infrastructure/Migrations/20251117105514_update_table_PlacementProfile_and_Candidate.cs deleted file mode 100644 index 24cadf6d..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20251117105514_update_table_PlacementProfile_and_Candidate.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_table_PlacementProfile_and_Candidate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "OccupationSalary", - table: "PlacementProfiles", - type: "double", - nullable: true, - comment: "ตำแหน่งปัจจุบัน เงินเดือน", - oldClrType: typeof(int), - oldType: "int", - oldNullable: true, - oldComment: "ตำแหน่งปัจจุบัน เงินเดือน"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "OccupationSalary", - table: "PlacementProfiles", - type: "int", - nullable: true, - comment: "ตำแหน่งปัจจุบัน เงินเดือน", - oldClrType: typeof(double), - oldType: "double", - oldNullable: true, - oldComment: "ตำแหน่งปัจจุบัน เงินเดือน"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20251121023046_Add rootdna to InsigniaMagOrg Table.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20251121023046_Add rootdna to InsigniaMagOrg Table.Designer.cs deleted file mode 100644 index a2898222..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20251121023046_Add rootdna to InsigniaMagOrg Table.Designer.cs +++ /dev/null @@ -1,21246 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20251121023046_Add rootdna to InsigniaMagOrg Table")] - partial class AddrootdnatoInsigniaMagOrgTable - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("double") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementEmployeeQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany() - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20251121023046_Add rootdna to InsigniaMagOrg Table.cs b/BMA.EHR.Infrastructure/Migrations/20251121023046_Add rootdna to InsigniaMagOrg Table.cs deleted file mode 100644 index de46c15b..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20251121023046_Add rootdna to InsigniaMagOrg Table.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class AddrootdnatoInsigniaMagOrgTable : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "InsigniaManageOrganiations", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "InsigniaManageOrganiations"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.Designer.cs deleted file mode 100644 index b65f0774..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.Designer.cs +++ /dev/null @@ -1,21250 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20260512073417_update_PlacementReceives_add_rank")] - partial class update_PlacementReceives_add_rank - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("double") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rank") - .HasColumnType("longtext") - .HasComment("ยศ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementEmployeeQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany() - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.cs b/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.cs deleted file mode 100644 index 1a258f42..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20260512073417_update_PlacementReceives_add_rank.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_PlacementReceives_add_rank : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "rank", - table: "PlacementReceives", - type: "longtext", - nullable: true, - comment: "ยศ") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "rank", - table: "PlacementReceives"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.Designer.cs deleted file mode 100644 index 894b1262..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.Designer.cs +++ /dev/null @@ -1,21266 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - [DbContext(typeof(ApplicationDBContext))] - [Migration("20260521081933_update_Tables_add_posExecutiveId")] - partial class update_Tables_add_posExecutiveId - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการรักษาการแทน"); - - b.Property("ActStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มรักษาการแทน"); - - b.Property("AuthorizedPosition") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserFullName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อผู้มีอำนาจลงนาม"); - - b.Property("AuthorizedUserId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม"); - - b.Property("CaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("ChairManFullName") - .HasColumnType("longtext") - .HasComment("ประธานคณะกรรมการ"); - - b.Property("CommandAffectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่คำสั่งมีผล"); - - b.Property("CommandExcecuteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกคำสั่ง"); - - b.Property("CommandNo") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandStatusId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงสถานะคำสั่ง"); - - b.Property("CommandSubject") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("คำสั่งเรื่อง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงประเภทคำสั่ง"); - - b.Property("CommandYear") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีที่ออกคำสั่ง"); - - b.Property("ComplaintId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องร้องเรียน"); - - b.Property("ConclusionFireDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireNo") - .HasColumnType("longtext") - .HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionFireResolution") - .HasColumnType("longtext") - .HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)"); - - b.Property("ConclusionMeetingDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionMeetingNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("ConclusionReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (การรับโอน)"); - - b.Property("ConclusionReceiveNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (การรับโอน)"); - - b.Property("ConclusionRegisterDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionRegisterNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)"); - - b.Property("ConclusionResultDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionResultNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)"); - - b.Property("ConclusionReturnDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionReturnNo") - .HasColumnType("longtext") - .HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)"); - - b.Property("ConclusionTranferDate") - .HasColumnType("datetime(6)") - .HasComment("การประชุม ลงวันที่"); - - b.Property("ConclusionTranferNo") - .HasColumnType("longtext") - .HasComment("การประชุม ครั้งที่"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Fault") - .HasColumnType("longtext") - .HasComment("รายละเอียดการกระทำผิด"); - - b.Property("FaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("GovAidCommandDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (คำสั่งช่วยราชการ)"); - - b.Property("GovAidCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)"); - - b.Property("GuiltyBasis") - .HasColumnType("longtext") - .HasComment("ฐานความผิด"); - - b.Property("IssuerOrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง"); - - b.Property("IssuerOrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Member1FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 1"); - - b.Property("Member2FullName") - .HasColumnType("longtext") - .HasComment("กรรมการคนที่ 2"); - - b.Property("MilitaryCommanDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("MilitaryCommandNo") - .HasColumnType("longtext") - .HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)"); - - b.Property("OwnerGovId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง"); - - b.Property("PlacementCommandDate") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งบรรจุลงวันที่"); - - b.Property("PlacementCommandIssuer") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ออกคำสั่งบรรจุ"); - - b.Property("PlacementCommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่งบรรจุ"); - - b.Property("PlacementId") - .HasColumnType("char(36)") - .HasComment("อ้างอิงรอบการสอบ"); - - b.Property("PlacementOrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดที่บรรจุ"); - - b.Property("PlacementPositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งที่บรรจุ"); - - b.Property("ProbationEndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการทดลองปฏิบัติราชการ"); - - b.Property("ProbationStartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มทดลองปฏิบัติราชการ"); - - b.Property("ReceiveOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่รับโอน"); - - b.Property("RefRaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฏหมาย"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลดำเนินการพิจารณา"); - - b.Property("SalaryPeriod") - .HasColumnType("longtext") - .HasComment("รอบเงินเดือน"); - - b.Property("SalaryPeriodId") - .HasColumnType("char(36)") - .HasComment("Id เรื่องเงินเดือน"); - - b.Property("SourceOrganizationName") - .HasColumnType("longtext") - .HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร"); - - b.Property("TransferOrganizationName") - .HasColumnType("longtext") - .HasComment("ส่วนราชการที่ให้โอน"); - - b.Property("Year") - .HasMaxLength(4) - .HasColumnType("varchar(4)") - .HasComment("ปีรอบเงินเดือน"); - - b.HasKey("Id"); - - b.HasIndex("CommandStatusId"); - - b.HasIndex("CommandTypeId"); - - b.HasIndex("PlacementId"); - - b.ToTable("Commands"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("ReceiveUserId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandDeployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทเอกสาร"); - - b.Property("CommandId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.HasIndex("DocumentId"); - - b.ToTable("CommandDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BirthDate") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CommandId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงคำสั่ง"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุ"); - - b.Property("Comment2") - .IsRequired() - .HasColumnType("text") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionNumber") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RefDisciplineId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลวินัย"); - - b.Property("RefPlacementProfileId") - .HasColumnType("char(36)") - .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับในบัญชีแนบท้าย"); - - b.HasKey("Id"); - - b.HasIndex("CommandId"); - - b.ToTable("CommandReceivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะของคำสั่ง"); - - b.Property("Sequence") - .HasColumnType("int") - .HasComment("ลำดับการทำงาน"); - - b.HasKey("Id"); - - b.ToTable("CommandStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CommandCode") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสของประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("CommandTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("DeploymentChannels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ยังไม่ชัวใช้อะไรเป็นkey"); - - b.HasKey("Id"); - - b.ToTable("LimitLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("จำนวนที่ลาได้"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Ability") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("AvatarRef") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนคู่สมรส"); - - b.Property("CoupleFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CoupleLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUser") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateRetire") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("DutyTimeEffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รอบการลงเวลามีผล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รอบการลงเวลาเข้างาน"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeMoneyAllowance") - .HasColumnType("double") - .HasComment("เงินช่วยเหลือค่าครองชีพชั่วคราว"); - - b.Property("EmployeeMoneyEmployee") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(ลูกจ้าง)"); - - b.Property("EmployeeMoneyEmployer") - .HasColumnType("double") - .HasComment("เงินสมทบประกันสังคม(นายจ้าง)"); - - b.Property("EmployeeMoneyIncrease") - .HasColumnType("double") - .HasComment("เงินเพิ่มการครองชีพชั่วคราว"); - - b.Property("EmployeeOc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("EmployeeTypeIndividual") - .HasColumnType("longtext") - .HasComment("ประเภทบุคคล"); - - b.Property("EmployeeWage") - .HasColumnType("double") - .HasComment("ค่าจ้าง"); - - b.Property("EntryStatus") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.Property("FatherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนบิดา"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("FirstNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ(เดิม)"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("GovAgeAbsent") - .HasColumnType("int"); - - b.Property("GovAgePlus") - .HasColumnType("int"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsLeave") - .HasColumnType("tinyint(1)"); - - b.Property("IsProbation") - .HasColumnType("tinyint(1)"); - - b.Property("IsSendVerified") - .HasColumnType("tinyint(1)"); - - b.Property("IsTransfer") - .HasColumnType("tinyint(1)"); - - b.Property("IsVerified") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastNameOld") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล(เดิม)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDateOrder") - .HasColumnType("datetime(6)"); - - b.Property("LeaveDetail") - .HasColumnType("longtext"); - - b.Property("LeaveNumberOrder") - .HasColumnType("longtext"); - - b.Property("LeaveReason") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); - - b.Property("LimitLeaveId") - .HasColumnType("char(36)"); - - b.Property("ModifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("MotherCareer") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherCitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่บัตรประชาชนมารดา"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherLive") - .HasColumnType("tinyint(1)") - .HasComment("มีชีวิตมารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("Physical") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานภาพทางกาย"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("PrefixOldId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า(เดิม)"); - - b.Property("ProfileType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("TransferDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedDate") - .HasColumnType("datetime(6)"); - - b.Property("VerifiedUser") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.HasIndex("GenderId"); - - b.HasIndex("LimitLeaveId"); - - b.HasIndex("PosNoId"); - - b.HasIndex("PositionEmployeeGroupId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.HasIndex("PositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.ToTable("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAbilitys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("Field") - .HasColumnType("longtext") - .HasComment("ด้าน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileAbilityId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAbilityId"); - - b.ToTable("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrict") - .HasColumnType("longtext") - .HasComment("เขตปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตปัจจุบัน"); - - b.Property("CurrentProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดปัจจุบัน"); - - b.Property("CurrentSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ปัจจุบัน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RegistrationAddress") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrict") - .HasColumnType("longtext") - .HasComment("เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationDistrictId") - .HasColumnType("char(36)") - .HasComment("Id เขตตามทะเบียนบ้าน"); - - b.Property("RegistrationProvince") - .HasColumnType("longtext") - .HasComment("จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationProvinceId") - .HasColumnType("char(36)") - .HasComment("Id จังหวัดตามทะเบียนบ้าน"); - - b.Property("RegistrationSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่"); - - b.Property("RegistrationSubDistrict") - .HasColumnType("longtext") - .HasComment("แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationSubDistrictId") - .HasColumnType("char(36)") - .HasComment("Id แขวงตามทะเบียนบ้าน"); - - b.Property("RegistrationZipCode") - .HasMaxLength(5) - .HasColumnType("varchar(5)") - .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAssessments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อแบบประเมิน"); - - b.Property("Point1") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่1 (คะแนน)"); - - b.Property("Point1Total") - .HasColumnType("double") - .HasComment("ส่วนที่1 (คะแนน)"); - - b.Property("Point2") - .HasColumnType("double") - .HasComment("ผลประเมินส่วนที่2 (คะแนน)"); - - b.Property("Point2Total") - .HasColumnType("double") - .HasComment("ส่วนที่2 (คะแนน)"); - - b.Property("PointSum") - .HasColumnType("double") - .HasComment("ผลประเมินรวม (คะแนน)"); - - b.Property("PointSumTotal") - .HasColumnType("double") - .HasComment("ผลรวม (คะแนน)"); - - b.Property("ProfileAssessmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileAssessmentId"); - - b.ToTable("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AvatarFileId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("AvatarFileId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileAvatarHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileCertificateId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileCertificateId"); - - b.ToTable("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChangeNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileChangeNameId") - .HasColumnType("char(36)"); - - b.Property("Status") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สถานะ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileChangeNameId"); - - b.ToTable("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileChildrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ChildrenCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบุตร"); - - b.Property("ChildrenFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบุตร"); - - b.Property("ChildrenLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบุตร"); - - b.Property("ChildrenPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบุตร"); - - b.Property("ChildrenPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบุตร"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileChildrenId") - .HasColumnType("char(36)"); - - b.Property("ProfileFamilyHistoryId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileChildrenId"); - - b.HasIndex("ProfileFamilyHistoryId"); - - b.ToTable("ProfileChildrenHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCoupleHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileCurrentAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDisciplines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("text") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("longtext") - .HasComment("ระดับความผิด"); - - b.Property("ProfileDisciplineId") - .HasColumnType("char(36)"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDisciplineId"); - - b.ToTable("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileDutys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มต้น"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileDutyId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileDutyId"); - - b.ToTable("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevel") - .HasColumnType("longtext") - .HasComment("ระดับศึกษา"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Id ระดับศึกษา"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasComment("เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("Id เป็นวุฒิการศึกษาในตำแหน่ง"); - - b.Property("ProfileEducationId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEducationId"); - - b.ToTable("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileEmployments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Command") - .HasColumnType("longtext") - .HasComment("คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ้าง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileEmploymentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileEmploymentId"); - - b.ToTable("ProfileEmploymentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Couple") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("CoupleCareer") - .HasColumnType("longtext") - .HasComment("อาชีพคู่สมรส"); - - b.Property("CoupleFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อคู่สมรส"); - - b.Property("CoupleLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("CoupleLastNameOld") - .HasColumnType("longtext") - .HasComment("นามสกุลคู่สมรส(เดิม)"); - - b.Property("CouplePrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าคู่สมรส"); - - b.Property("CouplePrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าคู่สมรส"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FatherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพบิดา"); - - b.Property("FatherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อบิดา"); - - b.Property("FatherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้าบิดา"); - - b.Property("FatherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้าบิดา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MotherCareer") - .HasColumnType("longtext") - .HasComment("อาชีพมารดา"); - - b.Property("MotherFirstName") - .HasColumnType("longtext") - .HasComment("ชื่อมารดา"); - - b.Property("MotherLastName") - .HasColumnType("longtext") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้ามารดา"); - - b.Property("MotherPrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้ามารดา"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFamilyHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileFatherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งบรรจุ"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("เริ่มปฎิบัติราชการ"); - - b.Property("GovAge") - .HasColumnType("longtext") - .HasComment("อายุราชการ"); - - b.Property("GovAgeAbsent") - .HasColumnType("int") - .HasComment("ขาดราชการ"); - - b.Property("GovAgePlus") - .HasColumnType("int") - .HasComment("อายุราชการเกื้อกูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReasonSameDate") - .HasColumnType("longtext") - .HasComment("เหตุผลกรณีไม่ตรงวัน"); - - b.Property("RetireDate") - .HasColumnType("longtext") - .HasComment("วันเกษียณอายุ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileGovernmentHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มเลือด"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EmployeeClass") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทลูกจ้าง"); - - b.Property("EmployeeType") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ประเภทการจ้าง"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("เพศ"); - - b.Property("GenderId") - .HasColumnType("char(36)") - .HasComment("Id เพศ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("PrefixId") - .HasColumnType("char(36)") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("สถานะภาพ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("ศาสนา"); - - b.Property("ReligionId") - .HasColumnType("char(36)") - .HasComment("Id ศาสนา"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileHonors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasComment("รายละเอียด"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่ออก"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileHonorId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileHonorId"); - - b.ToTable("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("RefCommandDate") - .HasColumnType("datetime(6)") - .HasComment("เอกสารอ้างอิง (ลงวันที่)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileInsignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAnnounce") - .HasColumnType("datetime(6)") - .HasComment("วันที่ประกาศในราชกิจจาฯ"); - - b.Property("Insignia") - .HasColumnType("longtext") - .HasComment("ชื่อเครื่องราชฯ"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("InsigniaType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Issue") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasComment("ราชกิจจาฯ ฉบับที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("ลำดับที่"); - - b.Property("Note") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("Page") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("หน้า"); - - b.Property("ProfileInsigniaId") - .HasColumnType("char(36)"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("ลงวันที่"); - - b.Property("Section") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("ตอน"); - - b.Property("Volume") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่ม"); - - b.Property("VolumeNo") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasComment("เล่มที่"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileInsigniaId"); - - b.ToTable("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEndLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่สิ้นสุดลา"); - - b.Property("DateStartLeave") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี ที่เริ่มลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NumLeave") - .HasColumnType("double") - .HasComment("ลาครั้งที่"); - - b.Property("ProfileLeaveId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะ"); - - b.Property("SumLeave") - .HasColumnType("double") - .HasComment("ลามาแล้ว"); - - b.Property("TotalLeave") - .HasColumnType("double") - .HasComment("รวมเป็น"); - - b.Property("TypeLeaveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileLeaveId"); - - b.HasIndex("TypeLeaveId"); - - b.ToTable("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveYear") - .HasColumnType("int"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("SumAbsent") - .HasColumnType("longtext"); - - b.Property("SumEducation") - .HasColumnType("longtext"); - - b.Property("SumLate") - .HasColumnType("longtext"); - - b.Property("SumRest") - .HasColumnType("longtext"); - - b.Property("SumSick") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileLeaveSummary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Career") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileMotherHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileNopaids"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileNopaidId") - .HasColumnType("char(36)"); - - b.Property("Reference") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileNopaidId"); - - b.ToTable("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("Id หน่วยงานที่สังกัด"); - - b.Property("UserId") - .HasColumnType("char(36)") - .HasComment("User Id KeyCloak"); - - b.HasKey("Id"); - - b.ToTable("ProfileOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("Detail") - .HasColumnType("longtext") - .HasComment("รายละเอียด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileOtherId"); - - b.ToTable("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CategoryName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ประเภทไฟล์-ไม่ใช้"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasComment("ชื่อไฟล์"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePapers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Address") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.Property("SubDistrictId") - .HasColumnType("char(36)"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("varchar(5)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileRegistrationAddressHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyName") - .HasColumnType("longtext") - .HasComment("AgencyName"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CLevel") - .HasColumnType("longtext") - .HasComment("CLevel"); - - b.Property("CommandNo") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CommandTypeName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับ"); - - b.Property("OrgName") - .HasColumnType("longtext") - .HasComment("OrgName"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("Id ชื่อย่อหน่วยงาน"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("PosNoName") - .HasColumnType("longtext") - .HasComment("PosNoName"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveName") - .HasColumnType("longtext") - .HasComment("PositionExecutiveName"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelName") - .HasColumnType("longtext"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionLineName") - .HasColumnType("longtext") - .HasComment("PositionLineName"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("PositionName"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionPathSideName") - .HasColumnType("longtext") - .HasComment("PositionPathSideName"); - - b.Property("PositionRef") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("PositionTypeName") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RefCommandNo") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง (เลขที่คำสั่ง)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("SalaryStatus") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งกรณีพิเศษ"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileSalaries"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปี รับตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("OcId") - .HasColumnType("char(36)") - .HasComment("Id สังกัด"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("PosNoEmployee") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่งลูกจ้าง"); - - b.Property("PosNoId") - .HasColumnType("char(36)") - .HasComment("Id เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeeGroup") - .HasColumnType("longtext") - .HasComment("กลุ่มงาน"); - - b.Property("PositionEmployeeGroupId") - .HasColumnType("char(36)") - .HasComment("Id กลุ่มงาน"); - - b.Property("PositionEmployeeLevel") - .HasColumnType("longtext") - .HasComment("ระดับชั้นงาน"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับชั้นงาน"); - - b.Property("PositionEmployeePosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionEmployeePositionSide") - .HasColumnType("longtext") - .HasComment("ด้านของตำแหน่ง"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านของตำแหน่ง"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้านทางการบริหาร"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasComment("Id ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment(" Id ระดับ"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("PositionLineId") - .HasColumnType("char(36)") - .HasComment("Id สายงาน"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("Id ด้าน/สาขา"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("Id ประเภทตำแหน่ง"); - - b.Property("ProfileSalaryId") - .HasColumnType("char(36)"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.HasKey("Id"); - - b.HasIndex("ProfileSalaryId"); - - b.ToTable("ProfileSalaryHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("PositionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionId"); - - b.ToTable("ProfileSalaryPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionNumber", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionsNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasComment("ไม่ใช้"); - - b.Property("Comment") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("ProfileSalaryPositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลา"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfileTrainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOrder") - .HasColumnType("datetime(6)") - .HasComment("คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่"); - - b.Property("Department") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน"); - - b.Property("Duration") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("รวมระยะเวลาในการฝึกอบรม/ดูงาน"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการฝึกอบรม/ดูงาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อโครงการ/หลักสูตรการฝึกอบรม"); - - b.Property("NumberOrder") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ"); - - b.Property("Place") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สถานที่ฝึกอบรม/ดูงาน"); - - b.Property("ProfileTrainingId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้นการฝึกอบรม/ดูงาน"); - - b.Property("Topic") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวข้อการฝึกอบรม/ดูงาน"); - - b.Property("Yearly") - .HasMaxLength(200) - .HasColumnType("int") - .HasComment("ปีที่อบรม (พ.ศ.)"); - - b.HasKey("Id"); - - b.HasIndex("ProfileTrainingId"); - - b.ToTable("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("TypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaPeriodId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RefId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งลูกจ้าง"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaPeriodId"); - - b.ToTable("InsigniaEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaId"); - - b.ToTable("InsigniaManages"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("รหัสหน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("char(36)") - .HasComment("รหัสหน่วยงาน"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนทั้งหมด"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageId"); - - b.ToTable("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BorrowDate") - .HasColumnType("datetime(6)") - .HasComment("ยืมวันที่"); - - b.Property("BorrowOrganization") - .HasColumnType("longtext"); - - b.Property("BorrowOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaManageOrganiationId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReturnDate") - .HasColumnType("datetime(6)") - .HasComment("คืนวันที่"); - - b.Property("ReturnOrganization") - .HasColumnType("longtext"); - - b.Property("ReturnOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Return"); - - b.Property("ReturnReason") - .HasColumnType("longtext") - .HasComment("เหตุผลคืน"); - - b.Property("Status") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaManageOrganiationId"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("InsigniaNotes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("InsigniaNoteId"); - - b.ToTable("InsigniaNoteDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Address") - .HasColumnType("longtext") - .HasComment("ที่อยู่ที่จ่าย"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DatePayment") - .HasColumnType("datetime(6)") - .HasComment("วันที่จ่ายใบกำกับ"); - - b.Property("DateReceive") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("DateReceiveInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเครื่องราชฯ"); - - b.Property("DateReturnInsignia") - .HasColumnType("datetime(6)") - .HasComment("วันที่คืนเครื่องราชฯ"); - - b.Property("DocReceiveInsigniaId") - .HasColumnType("char(36)"); - - b.Property("DocReturnInsigniaId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("InsigniaNoteId") - .HasColumnType("char(36)"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("Issue") - .HasColumnType("longtext") - .HasComment("ทะเบียนฐานันดร"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("No") - .HasColumnType("longtext") - .HasComment("ลำดับที่"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ"); - - b.Property("OrgReceiveInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReceiveInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานรับเครื่องราชฯ"); - - b.Property("OrgReturnInsignia") - .HasColumnType("longtext") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrgReturnInsigniaId") - .HasColumnType("char(36)") - .HasComment("หน่วยงานคืนเครื่องราชฯ"); - - b.Property("OrganizationOrganizationReceive") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ได้รับพระราชทานเครื่องราชฯ"); - - b.Property("OrganizationOrganizationSend") - .HasColumnType("longtext") - .HasComment("สังกัด ณ วันที่ขอพระราชทานเครื่องราชฯ"); - - b.Property("Page") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Section") - .HasColumnType("longtext") - .HasComment("ตอนที่"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.Property("TypePayment") - .HasColumnType("longtext") - .HasComment("รูปแบบการจ่าย"); - - b.Property("VolumeNo") - .HasColumnType("longtext") - .HasComment("เล่มที่"); - - b.HasKey("Id"); - - b.HasIndex("DocReceiveInsigniaId"); - - b.HasIndex("DocReturnInsigniaId"); - - b.HasIndex("InsigniaNoteId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasMaxLength(50) - .HasColumnType("int") - .HasComment("จำนวนวันแจ้งเตือนล่วงหน้า"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการ Freez ข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ชื่อรอบเสนอขอเครื่องราชฯ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("RevisionId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ราบการยื่นขอ"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("Type") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("ประเภทการขอ"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปี"); - - b.HasKey("Id"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("InsigniaPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PeriodId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RequestNote") - .IsRequired() - .HasColumnType("text"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PeriodId"); - - b.ToTable("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsApprove") - .HasColumnType("tinyint(1)"); - - b.Property("LastInsigniaName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MarkDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน มีโทษทางวินัย"); - - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - - b.Property("MarkLeave") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); - - b.Property("MarkRate") - .HasColumnType("tinyint(1)") - .HasComment("แจ้งเตือน ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)"); - - b.Property("MatchingConditions") - .HasColumnType("text") - .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - - b.Property("PosLevelName") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PosTypeName") - .HasColumnType("longtext"); - - b.Property("Position") - .HasColumnType("longtext"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการได้รับเครื่องราชฯ"); - - b.Property("ReasonReject") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่ยื่นขอ"); - - b.Property("RequestDate") - .HasColumnType("datetime(6)"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.Property("RequestInsigniaId") - .HasColumnType("char(36)"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะตำแหน่งที่ยื่นขอ"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.HasIndex("RequestInsigniaId"); - - b.ToTable("InsigniaRequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.BloodGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("varchar(2)") - .HasColumnOrder(1) - .HasComment("ชื่อหมู่โลหิต"); - - b.HasKey("Id"); - - b.ToTable("BloodGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ProvinceId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ProvinceId"); - - b.ToTable("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.EducationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ระดับการศึกษา"); - - b.HasKey("Id"); - - b.ToTable("EducationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Gender", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnOrder(1) - .HasComment("เพศ"); - - b.HasKey("Id"); - - b.ToTable("Genders"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Holiday", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("ประเภทของวันหยุดสำหรับ ทำงาน 5 วัน=`NORMAL`,ทำงาน 6 วัน=`6DAYS`"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("HolidayDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(2) - .HasComment("วันหยุด"); - - b.Property("IsSpecial") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("เป็นวันหยุดพิเศษหรือไม่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("varchar(250)") - .HasColumnOrder(4) - .HasComment("ชื่อวันหยุด"); - - b.Property("OriginalDate") - .HasColumnType("datetime(6)") - .HasColumnOrder(3) - .HasComment("วันหยุด(Original)"); - - b.Property("Year") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ประจำปี"); - - b.HasKey("Id"); - - b.ToTable("Holidays"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaTypeId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของเครื่องราช เอาไว้ตรวจสอบเวลาขอว่าต้องได้ชั้นที่สูงกว่าที่เคยได้รับแล้วเท่านั้น"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อเครื่องราช"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเครื่องราช"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaTypeId"); - - b.ToTable("Insignias"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.InsigniaType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทเครื่องราช"); - - b.HasKey("Id"); - - b.ToTable("InsigniaTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงานต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationFax", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์โทรสาร"); - - b.HasKey("Id"); - - b.ToTable("OrganizationFaxs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ส่วนราชการต้นสังกัด"); - - b.HasKey("Id"); - - b.ToTable("OrganizationGovernmentAgencys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ระดับ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ หน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationOrganizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AgencyCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสหน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ รหัสส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(4) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ตัวย่อหน่วยงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationShortNames"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ สถานะ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายนอก"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelExternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ เบอร์ติดต่อภายใน"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTelInternals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.OrganizationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ข้อมูลโครงสร้างหน่วยงานชื่อ ประเภท"); - - b.HasKey("Id"); - - b.ToTable("OrganizationTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PhysicalStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("สถานภาพทางกาย"); - - b.HasKey("Id"); - - b.ToTable("PhysicalStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExecutiveName") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(3) - .HasComment("ชื่อตำแหน่งทางการบริหาร"); - - b.Property("ExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(9) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionCategory") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("ตำแหน่งสำหรับข้าราชการหรือลูกจ้าง officer/employee"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("ExecutiveSideId"); - - b.HasIndex("PathSideId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("Positions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อกลุ่มงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeGroups"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับชั้นงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งข้อมูลตำแหน่งของลูกจ้างกรุงเทพ"); - - b.HasKey("Id"); - - b.ToTable("PositionEmployeeStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อตำแหน่งทางการบริหารของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้านทางการบริหาร"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionExecutiveSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(5) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnOrder(4) - .HasComment("ลำดับชั้นของระดับตำแหน่ง"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(3) - .HasComment("ชื่อย่อระดับตำแหน่ง"); - - b.HasKey("Id"); - - b.ToTable("PositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงานของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionLines"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPath", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสายงาน"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPaths"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionPathSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อด้าน/สาขา"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.ToTable("PositionPathSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อสถานะของตำแหน่งของข้อมูลตำแหน่งของข้าราชการ"); - - b.HasKey("Id"); - - b.ToTable("PositionStatuss"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.PositionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(2) - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("Order") - .HasColumnType("int") - .HasColumnOrder(1) - .HasComment("ลำดับ"); - - b.HasKey("Id"); - - b.ToTable("PositionTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Prefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(2) - .HasComment("รายละเอียดคำนำหน้า"); - - b.HasKey("Id"); - - b.ToTable("Prefixes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("จังหวัด"); - - b.HasKey("Id"); - - b.ToTable("Provinces"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Relationship", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnOrder(1) - .HasComment("ชื่อความสัมพันธ์"); - - b.HasKey("Id"); - - b.ToTable("Relationships"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Religion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ศาสนา"); - - b.HasKey("Id"); - - b.ToTable("Religions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Royal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเหรียญตรา"); - - b.Property("ShortName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("ชื่อย่อเหรียญตรา"); - - b.HasKey("Id"); - - b.ToTable("Royals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalHierarchy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อลำดับชั้นข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalHierarchys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.RoyalType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(2) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnOrder(1) - .HasComment("ชื่อประเภทข้อมูลเครื่องราชฯ"); - - b.HasKey("Id"); - - b.ToTable("RoyalTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DistrictId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)") - .HasColumnOrder(1) - .HasComment("เขต/อำเภอ"); - - b.Property("ZipCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnOrder(2) - .HasComment("รหัสไปรษณีย์"); - - b.HasKey("Id"); - - b.HasIndex("DistrictId"); - - b.ToTable("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Inbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("Inboxes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.MessageQueueEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSend") - .HasColumnType("tinyint(1)") - .HasComment("ทำการส่งข้อความแล้วหรือยัง?"); - - b.Property("IsSendEmail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมลล์หรือไม่?"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปที่กล่องข้อความหรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือไม่?"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("MessageContent") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดข้อความ"); - - b.Property("MessagePayLoad") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สิ่งที่แนบมาด้วย"); - - b.Property("ReceiverEmailAddress") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)") - .HasComment("อีเมล์ของผู้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสของผู้รับข้อความ"); - - b.Property("SenderSystem") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("ส่งจากระบบงาน"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("MessageQueues"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DeleteDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ลบข้อมูล"); - - b.Property("IsOpen") - .HasColumnType("tinyint(1)") - .HasComment("เปิดอ่านแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OpenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เปิดอ่าน"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทการแจ้งเตือน"); - - b.HasKey("Id"); - - b.ToTable("Notifications"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext"); - - b.Property("ConditionNote") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext"); - - b.Property("Government") - .HasColumnType("longtext"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsCondition") - .HasColumnType("tinyint(1)"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext"); - - b.Property("Pile") - .HasColumnType("longtext"); - - b.Property("PosNo") - .HasColumnType("longtext"); - - b.Property("PositionCondition") - .HasColumnType("longtext"); - - b.Property("PositionEmployeeLineId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationAgencyId"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationGovernmentAgencyId"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("PositionEmployeeLineId"); - - b.HasIndex("PositionEmployeePositionId"); - - b.HasIndex("PositionEmployeeStatusId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrgEmployeeId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("OrgEmployeeId"); - - b.HasIndex("ProfileId"); - - b.ToTable("OrganizationEmployeeProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeeLevelId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeeLevelId"); - - b.ToTable("OrganizationPositionEmployeeLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationEmployeeId") - .HasColumnType("char(36)"); - - b.Property("PositionEmployeePositionSideId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationEmployeeId"); - - b.HasIndex("PositionEmployeePositionSideId"); - - b.ToTable("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionMasterId"); - - b.ToTable("AvailablePositionLevels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Agency") - .HasColumnType("longtext") - .HasColumnOrder(14) - .HasComment("หน่วยงาน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Department") - .HasColumnType("longtext") - .HasColumnOrder(16) - .HasComment("ฝ่าย/ส่วน"); - - b.Property("Government") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("ส่วนราชการ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(10) - .HasComment("OrganizationAgencyId"); - - b.Property("OrganizationFaxId") - .HasColumnType("char(36)"); - - b.Property("OrganizationGovernmentAgencyId") - .HasColumnType("char(36)") - .HasColumnOrder(11) - .HasComment("OrganizationGovernmentAgencyId"); - - b.Property("OrganizationLevelId") - .HasColumnType("char(36)"); - - b.Property("OrganizationOrder") - .HasColumnType("int") - .HasColumnOrder(12) - .HasComment("OrganizationOrder"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.Property("OrganizationStatusId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelExternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTelInternalId") - .HasColumnType("char(36)"); - - b.Property("OrganizationTypeId") - .HasColumnType("char(36)"); - - b.Property("OrganizationUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("OrganizationUserNote"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Pile") - .HasColumnType("longtext") - .HasColumnOrder(17) - .HasComment("กอง"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationFaxId"); - - b.HasIndex("OrganizationLevelId"); - - b.HasIndex("OrganizationOrganizationId"); - - b.HasIndex("OrganizationShortNameId"); - - b.HasIndex("OrganizationStatusId"); - - b.HasIndex("OrganizationTelExternalId"); - - b.HasIndex("OrganizationTelInternalId"); - - b.HasIndex("OrganizationTypeId"); - - b.HasIndex("ParentId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(3) - .HasComment("Is Director"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionUserNote") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("positionUserNote"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationId"); - - b.HasIndex("PositionMasterId"); - - b.HasIndex("PositionNumberId"); - - b.ToTable("OrganizationPositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPublishHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(1) - .HasComment("รายละเอียดการแก้ไข"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ObjectValue") - .IsRequired() - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("เก็บ Object ที่มีการอัพเดตในระบบ"); - - b.HasKey("Id"); - - b.ToTable("OrganizationPublishHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionId") - .HasColumnType("char(36)") - .HasColumnOrder(2) - .HasComment("PositionId"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatusId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionExecutiveId"); - - b.HasIndex("PositionExecutiveSideId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionStatusId"); - - b.HasIndex("PositionTypeId"); - - b.ToTable("PositionMasters"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsDirector") - .HasColumnType("tinyint(1)") - .HasColumnOrder(14) - .HasComment("IsDirector"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Position") - .HasColumnType("longtext") - .HasColumnOrder(2) - .HasComment("Position"); - - b.Property("PositionCondition") - .HasColumnType("longtext") - .HasColumnOrder(11) - .HasComment("PositionCondition"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasColumnOrder(5) - .HasComment("PositionExecutive"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext") - .HasColumnOrder(6) - .HasComment("PositionExecutiveSide"); - - b.Property("PositionExecutiveSideObject") - .HasColumnType("longtext"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasColumnOrder(12) - .HasComment("PositionLevel"); - - b.Property("PositionLine") - .HasColumnType("longtext") - .HasColumnOrder(8) - .HasComment("PositionLine"); - - b.Property("PositionMasterEntityId") - .HasColumnType("char(36)"); - - b.Property("PositionMasterUserNote") - .HasColumnType("longtext") - .HasColumnOrder(13) - .HasComment("PositionMasterUserNote"); - - b.Property("PositionPath") - .HasColumnType("longtext") - .HasColumnOrder(3) - .HasComment("PositionPath"); - - b.Property("PositionPathSide") - .HasColumnType("longtext") - .HasColumnOrder(7) - .HasComment("PositionPathSide"); - - b.Property("PositionPathSideObject") - .HasColumnType("longtext"); - - b.Property("PositionStatus") - .HasColumnType("longtext") - .HasColumnOrder(10) - .HasComment("PositionStatus"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasColumnOrder(4) - .HasComment("PositionType"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasColumnOrder(15) - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.HasIndex("PositionMasterEntityId"); - - b.ToTable("PositionMasterHistoryEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasMaxLength(300) - .HasColumnType("varchar(300)") - .HasColumnOrder(2) - .HasComment("ชื่อ"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationShortNameId"); - - b.ToTable("PositionNumbers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("ProfileId"); - - b.ToTable("ProfilePositions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("GovernmentCode") - .HasColumnType("longtext"); - - b.Property("GovernmentCodeOld") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("OrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("OrganizationOrganizationOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationShortName") - .HasColumnType("longtext"); - - b.Property("OrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ"); - - b.Property("OrganizationShortNameOld") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("PositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร"); - - b.Property("PositionExecutiveSideOld") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่งเดิม"); - - b.Property("PositionNum") - .HasColumnType("longtext"); - - b.Property("PositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่"); - - b.Property("PositionNumOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่เดิม"); - - b.Property("PositionPath") - .HasColumnType("longtext"); - - b.Property("PositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน"); - - b.Property("PositionPathOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงานเดิม"); - - b.Property("PositionPathSide") - .HasColumnType("longtext"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา"); - - b.Property("PositionPathSideOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขาเดิม"); - - b.Property("PositionType") - .HasColumnType("longtext"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่งเดิม"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.ToTable("Report2s"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.ToTable("Report2DetailHistories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Education") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("FullName") - .HasColumnType("longtext") - .HasComment("ชื่อ-สกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NewGovernmentCode") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganization") - .HasColumnType("longtext"); - - b.Property("NewOrganizationOrganizationId") - .HasColumnType("char(36)") - .HasComment("ชื่อหน่วยงาน กำหนดใหม่"); - - b.Property("NewOrganizationShortName") - .HasColumnType("longtext"); - - b.Property("NewOrganizationShortNameId") - .HasColumnType("char(36)") - .HasComment("รหัสส่วนราชการ กำหนดใหม่"); - - b.Property("NewPositionExecutive") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งทางการบริหาร กำหนดใหม่"); - - b.Property("NewPositionExecutiveSide") - .HasColumnType("longtext"); - - b.Property("NewPositionExecutiveSideId") - .HasColumnType("char(36)") - .HasComment("ด้านทางบริหาร กำหนดใหม่"); - - b.Property("NewPositionLevel") - .HasColumnType("longtext"); - - b.Property("NewPositionLevelId") - .HasColumnType("char(36)") - .HasComment("ระดับตำแหน่ง กำหนดใหม่"); - - b.Property("NewPositionNum") - .HasColumnType("longtext"); - - b.Property("NewPositionNumId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งเลขที่ กำหนดใหม่"); - - b.Property("NewPositionPath") - .HasColumnType("longtext"); - - b.Property("NewPositionPathId") - .HasColumnType("char(36)") - .HasComment("ตำแหน่งในสายงาน กำหนดใหม่"); - - b.Property("NewPositionPathSide") - .HasColumnType("longtext"); - - b.Property("NewPositionPathSideId") - .HasColumnType("char(36)") - .HasComment("ด้าน/สาขา กำหนดใหม่"); - - b.Property("NewPositionType") - .HasColumnType("longtext"); - - b.Property("NewPositionTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทตำแหน่ง กำหนดใหม่"); - - b.Property("OldGovernmentCode") - .HasColumnType("longtext"); - - b.Property("OldOrganizationOrganization") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน กำหนดเดิม"); - - b.Property("OldOrganizationShortName") - .HasColumnType("longtext") - .HasComment("รหัสส่วนราชการ กำหนดเดิม"); - - b.Property("OldPositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร กำหนดเดิม"); - - b.Property("OldPositionExecutiveSide") - .HasColumnType("longtext") - .HasComment("ด้านทางบริหาร กำหนดเดิม"); - - b.Property("OldPositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับตำแหน่ง กำหนดเดิม"); - - b.Property("OldPositionNum") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเลขที่ กำหนดเดิม"); - - b.Property("OldPositionPath") - .HasColumnType("longtext") - .HasComment("ตำแหน่งในสายงาน กำหนดเดิม"); - - b.Property("OldPositionPathSide") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา กำหนดเดิม"); - - b.Property("OldPositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง กำหนดเดิม"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("ProfilePositionId") - .HasColumnType("char(36)") - .HasComment("สังกัดที่ถือครอง"); - - b.Property("Report2DetailHistoryId") - .HasColumnType("char(36)"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("SalaryMonth") - .HasColumnType("double") - .HasComment("เงินตอบแทนรายเดือน"); - - b.Property("SalaryPosition") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะการเปลี่ยนแปลง"); - - b.HasKey("Id"); - - b.HasIndex("Report2DetailHistoryId"); - - b.ToTable("Report2Histories"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดบัญชี"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รอบการสอบ"); - - b.Property("Number") - .HasMaxLength(10) - .HasColumnType("int") - .HasComment("จำนวนผู้สอบได้"); - - b.Property("PlacementTypeId") - .HasColumnType("char(36)"); - - b.Property("RefId") - .HasColumnType("char(36)") - .HasComment("Id การสอบ"); - - b.Property("Round") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ครั้งที่"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มบัญชีบัญชี"); - - b.Property("Year") - .HasMaxLength(5) - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("PlacementTypeId"); - - b.ToTable("Placements"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด/ตำแหน่งเเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน old"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.Property("type") - .HasColumnType("longtext") - .HasComment("ประเภทราชการ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementAppointmentId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementAppointmentId"); - - b.ToTable("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("PlacementAppointmentEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CertificateNo") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขที่ใบอนุญาต"); - - b.Property("CertificateType") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อใบอนุญาต"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExpireDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่หมดอายุ"); - - b.Property("IssueDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกใบอนุญาต"); - - b.Property("Issuer") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หน่วยงานผู้ออกใบอนุญาต"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementCertificates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Country") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ประเทศ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Degree") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("วุฒิการศึกษา"); - - b.Property("Duration") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ระยะเวลา"); - - b.Property("DurationYear") - .HasColumnType("int") - .HasComment("ระยะเวลาหลักสูตร"); - - b.Property("EducationLevelId") - .HasColumnType("char(36)") - .HasComment("Idวุฒิที่ได้รับ"); - - b.Property("EducationLevelName") - .HasColumnType("longtext") - .HasComment("วุฒิที่ได้รับ"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("ถึง"); - - b.Property("Field") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("สาขาวิชา/ทาง"); - - b.Property("FinishDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่สำเร็จการศึกษา"); - - b.Property("FundName") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ทุน"); - - b.Property("Gpa") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เกรดเฉลี่ย"); - - b.Property("Institute") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("สถานศึกษา"); - - b.Property("IsDate") - .HasColumnType("tinyint(1)") - .HasComment("ประเภทช่วงเวลาการศึกษา"); - - b.Property("IsEducation") - .HasColumnType("tinyint(1)") - .HasComment("เป็นวุฒิศึกษาในตำแหน่ง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Other") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasComment("ข้อมูลการติดต่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่"); - - b.HasKey("Id"); - - b.HasIndex("PlacementProfileId"); - - b.HasIndex("PositionPathId"); - - b.ToTable("PlacementEducations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementIsProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อคุณสมบัติ"); - - b.HasKey("Id"); - - b.ToTable("PlacementIsProperties"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementOfficer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("ถึงวันที่"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ช่วยราชการไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("commandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementOfficers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CitizenDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกบัตร"); - - b.Property("CitizenDistrictId") - .HasColumnType("longtext") - .HasComment("Id เขตที่ออกบัตรประชาชน"); - - b.Property("CitizenId") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CitizenProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่ออกบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("CurrentAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ปัจจุบัน"); - - b.Property("CurrentDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ปัจจุบัน"); - - b.Property("CurrentProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ปัจจุบัน"); - - b.Property("CurrentSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ปัจจุบัน"); - - b.Property("CurrentZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("Draft") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลตำแหน่ง Draft"); - - b.Property("Email") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อีเมล"); - - b.Property("ExamNumber") - .HasColumnType("int") - .HasComment("ลำดับที่สอบได้"); - - b.Property("ExamRound") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่สมัครสอบ"); - - b.Property("FatherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงบิดา"); - - b.Property("FatherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลบิดา"); - - b.Property("FatherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติบิดา"); - - b.Property("FatherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพบิดา"); - - b.Property("FatherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อบิดา"); - - b.Property("Firstname") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsOfficer") - .HasColumnType("tinyint(1)") - .HasComment("ข้าราชการฯ กทม."); - - b.Property("IsOld") - .HasColumnType("tinyint(1)") - .HasComment("ข้อมูลเก่า"); - - b.Property("IsProperty") - .HasColumnType("longtext") - .HasComment("การคัดกรองคุณสมบัติ"); - - b.Property("IsRelief") - .HasColumnType("tinyint(1)") - .HasComment("ผ่อนผัน"); - - b.Property("Knowledge") - .HasColumnType("longtext") - .HasComment("ความสามารถพิเศษ"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Marry") - .HasColumnType("tinyint(1)") - .HasComment("คู่สมรส"); - - b.Property("MarryFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงคู่สมรส"); - - b.Property("MarryLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลคู่สมรส"); - - b.Property("MarryNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติคู่สมรส"); - - b.Property("MarryOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพคู่สมรส"); - - b.Property("MarryPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อคู่สมรส"); - - b.Property("MobilePhone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("MotherFirstName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อจริงมารดา"); - - b.Property("MotherLastName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุลมารดา"); - - b.Property("MotherNationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติมารดา"); - - b.Property("MotherOccupation") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("อาชีพมารดา"); - - b.Property("MotherPrefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้าชื่อมารดา"); - - b.Property("MouthSalaryAmount") - .HasColumnType("double") - .HasComment("เงินค่าตอบแทนรายเดือน"); - - b.Property("Nationality") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("สัญชาติ"); - - b.Property("OccupationGroup") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย"); - - b.Property("OccupationOrg") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ชื่อตำแหน่ง"); - - b.Property("OccupationPile") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน กอง"); - - b.Property("OccupationPosition") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน สังกัด"); - - b.Property("OccupationPositionType") - .HasColumnType("longtext") - .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - - b.Property("OccupationSalary") - .HasColumnType("double") - .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); - - b.Property("OccupationTelephone") - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("โทรศัพท์ บริษัท"); - - b.Property("Pass") - .HasColumnType("longtext") - .HasComment("ผลสมัครสอบ"); - - b.Property("PlacementId") - .HasColumnType("char(36)"); - - b.Property("PlacementStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการบรรจุ"); - - b.Property("PointA") - .HasColumnType("double") - .HasComment("คะแนนภาค ก"); - - b.Property("PointB") - .HasColumnType("double") - .HasComment("คะแนนภาค ข"); - - b.Property("PointC") - .HasColumnType("double") - .HasComment("คะแนนภาค ค"); - - b.Property("PointTotalA") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ก"); - - b.Property("PointTotalB") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ข"); - - b.Property("PointTotalC") - .HasColumnType("double") - .HasComment("คะแนนเต็มภาค ค"); - - b.Property("PosNumber") - .HasColumnType("int") - .HasComment("ชื่อตำแหน่งเลขที่"); - - b.Property("PosPath") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่ง"); - - b.Property("PositionCandidate") - .HasColumnType("longtext") - .HasComment("ตำแหน่งสอบ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionSalaryAmount") - .HasColumnType("double") - .HasComment("เงินประจำตำแหน่ง"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภทตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("Id คำนำหน้า"); - - b.Property("ProfileImgId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasComment("เชื้อชาติ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RegistAddress") - .HasColumnType("longtext") - .HasComment("ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistDistrictId") - .HasColumnType("longtext") - .HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistProvinceId") - .HasColumnType("longtext") - .HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSame") - .HasColumnType("tinyint(1)") - .HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistSubDistrictId") - .HasColumnType("longtext") - .HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RegistZipCode") - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลสละสิทธิ์"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานภาพ"); - - b.Property("ReliefDocId") - .HasColumnType("char(36)"); - - b.Property("ReliefReason") - .HasColumnType("longtext") - .HasComment("เหตุผลผ่อนผัน"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RemarkVertical") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวตั้ง"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("SalaryClass") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง (รายละเอียด)"); - - b.Property("SalaryRef") - .HasColumnType("longtext") - .HasComment("เอกสารอ้างอิง"); - - b.Property("Telephone") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4IdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("commandId") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("nodeIdOld") - .HasColumnType("longtext") - .HasComment("id โครงสร้าง"); - - b.Property("nodeOld") - .HasColumnType("longtext") - .HasComment("ระดับโครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgRevisionIdOld") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("orgTreeShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน"); - - b.Property("organizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelIdOld") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeIdOld") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionFieldOld") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionIdOld") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("positionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("posmasterIdOld") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profileId"); - - b.Property("refCommandCode") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandDate") - .HasMaxLength(200) - .HasColumnType("datetime(6)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandName") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("refCommandNo") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootIdOld") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("templateDoc") - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("โทรศัพท์มือถือ"); - - b.Property("typeCommand") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.HasKey("Id"); - - b.HasIndex("PlacementId"); - - b.HasIndex("ProfileImgId"); - - b.HasIndex("ReliefDocId"); - - b.ToTable("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementProfileId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementProfileId"); - - b.ToTable("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("AvatarId") - .HasColumnType("char(36)"); - - b.Property("BloodGroup") - .HasColumnType("longtext") - .HasComment("Id กลุ่มเลือด"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Gender") - .HasColumnType("longtext") - .HasComment("Id เพศ"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับโอนราชการ"); - - b.Property("Relationship") - .HasColumnType("longtext") - .HasComment("Id สถานะภาพ"); - - b.Property("Religion") - .HasColumnType("longtext") - .HasComment("Id ศาสนา"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rank") - .HasColumnType("longtext") - .HasComment("ยศ"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("AvatarId"); - - b.ToTable("PlacementReceives"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementReceiveId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementReceiveId"); - - b.ToTable("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("BloodGroupId") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateOfBirth") - .HasMaxLength(40) - .HasColumnType("datetime(6)") - .HasComment("วันเกิด"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("Firstname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("GenderId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Lastname") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("Nationality") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("สัญชาติ"); - - b.Property("OrganizationPositionId") - .HasColumnType("char(36)"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionLevelId") - .HasColumnType("char(36)"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionLineId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberId") - .HasColumnType("char(36)"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionPathId") - .HasColumnType("char(36)"); - - b.Property("PositionPathSideId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeId") - .HasColumnType("char(36)"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("PrefixId") - .HasColumnType("char(36)"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Race") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("เชื้อชาติ"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("RelationshipId") - .HasColumnType("char(36)"); - - b.Property("ReligionId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("TelephoneNumber") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("เบอร์โทร"); - - b.HasKey("Id"); - - b.HasIndex("BloodGroupId"); - - b.HasIndex("GenderId"); - - b.HasIndex("OrganizationPositionId"); - - b.HasIndex("PositionLevelId"); - - b.HasIndex("PositionLineId"); - - b.HasIndex("PositionNumberId"); - - b.HasIndex("PositionPathId"); - - b.HasIndex("PositionPathSideId"); - - b.HasIndex("PositionTypeId"); - - b.HasIndex("PrefixId"); - - b.HasIndex("ProfileId"); - - b.HasIndex("RelationshipId"); - - b.HasIndex("ReligionId"); - - b.ToTable("PlacementRelocations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementRelocationId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementRelocationId"); - - b.ToTable("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRepatriation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("DateRepatriation") - .HasColumnType("datetime(6)") - .HasComment("ส่งตัวกลับตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("refId") - .HasColumnType("char(36)") - .HasComment("Id อ้างอิงช่วยราช"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementRepatriations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ส่งตัวกลับไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("PlacementTransfers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PlacementTransferId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("PlacementTransferId"); - - b.ToTable("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทบรรจุ"); - - b.HasKey("Id"); - - b.ToTable("PlacementTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Probation.CronjobNotiProbation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Body") - .IsRequired() - .HasColumnType("text") - .HasComment("รายละเอียดข้อความ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNoti") - .HasColumnType("tinyint(1)") - .HasComment("ส่งการแจ้งเตือนหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Payload") - .IsRequired() - .HasColumnType("text") - .HasComment("สิงที่แนบมาด้วย"); - - b.Property("ReceiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ได้รับ"); - - b.Property("ReceiverUserId") - .HasColumnType("char(36)") - .HasComment("รหัสผู้รับข้อความ"); - - b.Property("Subject") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasComment("หัวเรื่อง"); - - b.HasKey("Id"); - - b.ToTable("CronjobNotiProbations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("วันที่เสียชีวิต"); - - b.Property("DocumentForwardId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ออกใบมรณบัตร"); - - b.Property("Number") - .HasColumnType("longtext") - .HasComment("เลขที่ใบมรณบัตร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลการเสียชีวิต"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DocumentForwardId"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementDeceaseds"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .IsRequired() - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("เลขประจำตัวประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsSendInbox") - .HasColumnType("tinyint(1)") - .HasComment("ส่งกล่องข้อความหรือไม่?"); - - b.Property("IsSendMail") - .HasColumnType("tinyint(1)") - .HasComment("ส่งอีเมล์หรือไม่?"); - - b.Property("IsSendNotification") - .HasColumnType("tinyint(1)") - .HasComment("ส่งแจ้งเตือนหรือไม่?"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); - - b.Property("Prefix") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasComment("คำนำหน้านาม"); - - b.Property("RetirementDeceasedId") - .HasColumnType("char(36)"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementDeceasedId"); - - b.ToTable("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ปลดออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementDischarges"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementEmployeeQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ไล่ออกไป"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.HasKey("Id"); - - b.HasIndex("ProfileId"); - - b.ToTable("RetirementExpulsions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Amount") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EducationOld") - .HasColumnType("longtext") - .HasComment("วุฒิ/สาขาเดิม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ออกราชการเมื่อ"); - - b.Property("MilitaryDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่พ้นจากราชการทหาร"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("PositionDate") - .HasColumnType("datetime(6)") - .HasComment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ"); - - b.Property("PositionExecutive") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่รับย้ายราชการ"); - - b.Property("RecruitDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่บรรจุ"); - - b.Property("ReportingDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานตัว"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna old"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna old"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna old"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna old"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("node") - .HasColumnType("int") - .HasComment("ระดับโครงสร้าง"); - - b.Property("nodeId") - .HasColumnType("char(36)") - .HasComment("id โครงสร้าง"); - - b.Property("orgRevisionId") - .HasColumnType("longtext") - .HasComment("id revision"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("positionField") - .HasColumnType("longtext") - .HasComment("สายงาน"); - - b.Property("positionId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่ง"); - - b.Property("posmasterId") - .HasColumnType("longtext") - .HasComment("id อัตรากำลัง"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna old"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("CommandTypeId"); - - b.ToTable("RetirementOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementOtherId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementOtherId"); - - b.ToTable("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOut", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Date") - .HasColumnType("datetime(6)") - .HasComment("ตั้งแต่วันที่"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่ให้ออกไป"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะคำขอ"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementOuts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.ToTable("RetirementPeriods"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดมติ อกก"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileFile") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายชื่อเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("Round") - .HasColumnType("int") - .HasComment("ครั้งที่"); - - b.Property("SignDate") - .HasColumnType("datetime(6)") - .HasComment("ประกาศ ณ วันที่"); - - b.Property("Total") - .HasColumnType("int") - .HasComment("จำนวนคน"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("TypeReport") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่ง"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementPeriodHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestionnaireQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Question10Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 10"); - - b.Property("Question10Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 10"); - - b.Property("Question10Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 10"); - - b.Property("Question1Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 1"); - - b.Property("Question1Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 1"); - - b.Property("Question1Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 1"); - - b.Property("Question2Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 2"); - - b.Property("Question2Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 2"); - - b.Property("Question2Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 2"); - - b.Property("Question3Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 3"); - - b.Property("Question3Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 3"); - - b.Property("Question3Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 3"); - - b.Property("Question4Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 4"); - - b.Property("Question4Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 4"); - - b.Property("Question4Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 4"); - - b.Property("Question5Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 5"); - - b.Property("Question5Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 5"); - - b.Property("Question5Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 5"); - - b.Property("Question6Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 6"); - - b.Property("Question6Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 6"); - - b.Property("Question6Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 6"); - - b.Property("Question7Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 7"); - - b.Property("Question7Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 7"); - - b.Property("Question7Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 7"); - - b.Property("Question8Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 8"); - - b.Property("Question8Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 8"); - - b.Property("Question8Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 8"); - - b.Property("Question9Answer") - .HasColumnType("longtext") - .HasComment("กรอกคะแนน 9"); - - b.Property("Question9Desc") - .HasColumnType("longtext") - .HasComment("คำถามข้อที่ 9"); - - b.Property("Question9Score") - .HasColumnType("longtext") - .HasComment("คำตอบข้อที่ 9"); - - b.HasKey("Id"); - - b.ToTable("RetirementQuestionnaireQuestions"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Order") - .HasColumnType("int") - .HasComment("ลำดับที่"); - - b.Property("Reason") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เหตุผล"); - - b.Property("Remove") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ลบออกจากเกษียญ"); - - b.Property("RetirementPeriodId") - .HasColumnType("char(36)"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 "); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร "); - - b.Property("posExecutiveName") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งทางการบริหาร "); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง "); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง "); - - b.Property("posLevelRank") - .HasColumnType("int") - .HasComment("ลำดับระดับตำแหน่ง "); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง "); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง "); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง "); - - b.Property("posTypeRank") - .HasColumnType("int") - .HasComment("ลำดับประเภทตำแหน่ง "); - - b.Property("position") - .HasColumnType("longtext") - .HasComment("ชื่อตำแหน่งในสายงาน "); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementPeriodId"); - - b.ToTable("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResigns"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionExecutiveOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหารเดิม"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsCancel") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยกเลิก"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("ReasonResign") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.ToTable("RetirementResignEmployees"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ActiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ขอออกราชการ"); - - b.Property("AmountOld") - .HasColumnType("double") - .HasComment("ข้อมูลหน่วยงานเดิม เงินเดือน"); - - b.Property("ApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติ"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("CancelReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยกเลิก"); - - b.Property("CommanderApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้บังคับบัญชา"); - - b.Property("CommanderReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้บังคับบัญชา"); - - b.Property("CommanderRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้บังคับบัญชา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการใช้งาน"); - - b.Property("IsDiscipline") - .HasColumnType("tinyint(1)") - .HasComment("สถานะพฤติการณ์ทางวินัย"); - - b.Property("IsNoBurden") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"); - - b.Property("IsNoDebt") - .HasColumnType("tinyint(1)") - .HasComment("สถานะไม่เป็นหนี้สหกรณ์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Location") - .HasColumnType("longtext") - .HasComment("สถานที่ยื่นขอลาออกราชการ"); - - b.Property("OfficerApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติการเจ้าหน้าที่"); - - b.Property("OfficerReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งการเจ้าหน้าที่"); - - b.Property("OfficerRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งการเจ้าหน้าที่"); - - b.Property("OligarchApproveReason") - .HasColumnType("longtext") - .HasComment("เหตุผลอนุมัติผู้ดูแล"); - - b.Property("OligarchReject") - .HasColumnType("tinyint(1)") - .HasComment("สถานะยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยับยั้งผู้ดูแล"); - - b.Property("OligarchRejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลยับยั้งผู้ดูแล"); - - b.Property("OrganizationOld") - .HasColumnType("longtext") - .HasComment("สังกัดเดิม"); - - b.Property("OrganizationPositionOld") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PositionLevelOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ระดับ"); - - b.Property("PositionNumberOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม เลขที่"); - - b.Property("PositionOld") - .HasColumnType("longtext") - .HasComment("ตำแหน่งเดิม"); - - b.Property("PositionTypeOld") - .HasColumnType("longtext") - .HasComment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท"); - - b.Property("Reason") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ"); - - b.Property("RejectReason") - .HasColumnType("longtext") - .HasComment("เหตุผลไม่อนุมัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("เหตุผลที่ลาออกจากราชการ(อื่นๆ)"); - - b.Property("RemarkHorizontal") - .HasColumnType("longtext") - .HasComment("หมายเหตุแนวนอน"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("SendDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่ยื่นขอออกราชการ"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะลาออก"); - - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 old"); - - b.Property("child1OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - - b.Property("child1ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1 old"); - - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 old"); - - b.Property("child2OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - - b.Property("child2ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2 old"); - - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 old"); - - b.Property("child3OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - - b.Property("child3ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3 old"); - - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4Old") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 old"); - - b.Property("child4OldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - - b.Property("child4ShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4 old"); - - b.Property("citizenId") - .HasColumnType("longtext") - .HasComment("เลขบัตรประชาชน"); - - b.Property("firstName") - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("lastName") - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("posLevelNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง old"); - - b.Property("posLevelOldId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง old"); - - b.Property("posMasterNoOld") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง old"); - - b.Property("posTypeNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง old"); - - b.Property("posTypeOldId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง old"); - - b.Property("prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("profileId") - .HasColumnType("longtext") - .HasComment("profile Id"); - - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootOld") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root old"); - - b.Property("rootOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - - b.Property("rootShortNameOld") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root old"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeCancels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDebtDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", "CommandStatus") - .WithMany() - .HasForeignKey("CommandStatusId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany() - .HasForeignKey("PlacementId"); - - b.Navigation("CommandStatus"); - - b.Navigation("CommandType"); - - b.Navigation("Placement"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Deployments") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Documents") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.Command", "Command") - .WithMany("Receivers") - .HasForeignKey("CommandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Command"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany("LimitTypeLeaves") - .HasForeignKey("TypeLeaveId"); - - b.Navigation("LimitLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.LimitLeave", "LimitLeave") - .WithMany("Profiles") - .HasForeignKey("LimitLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PosNo") - .WithMany() - .HasForeignKey("PosNoId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeGroup", "PositionEmployeeGroup") - .WithMany() - .HasForeignKey("PositionEmployeeGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "Position") - .WithMany() - .HasForeignKey("PositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId"); - - b.Navigation("Avatar"); - - b.Navigation("Gender"); - - b.Navigation("LimitLeave"); - - b.Navigation("PosNo"); - - b.Navigation("Position"); - - b.Navigation("PositionEmployeeGroup"); - - b.Navigation("PositionEmployeeLevel"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeePositionSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Abilitys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAbility", "ProfileAbility") - .WithMany("ProfileAbilityHistorys") - .HasForeignKey("ProfileAbilityId"); - - b.Navigation("ProfileAbility"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AddressHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Assessments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileAssessment", "ProfileAssessment") - .WithMany("ProfileAssessmentHistorys") - .HasForeignKey("ProfileAssessmentId"); - - b.Navigation("ProfileAssessment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAvatarHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "AvatarFile") - .WithMany() - .HasForeignKey("AvatarFileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("AvatarHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AvatarFile"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Certificates") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificateHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileCertificate", "ProfileCertificate") - .WithMany("ProfileCertificateHistorys") - .HasForeignKey("ProfileCertificateId"); - - b.Navigation("ProfileCertificate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ChangeNames") - .HasForeignKey("ProfileId"); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeNameHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChangeName", "ProfileChangeName") - .WithMany("ProfileChangeNameHistorys") - .HasForeignKey("ProfileChangeNameId"); - - b.Navigation("Document"); - - b.Navigation("ProfileChangeName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Childrens") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildrenHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileChildren", null) - .WithMany("ProfileChildrenHistorys") - .HasForeignKey("ProfileChildrenId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", null) - .WithMany("Childrens") - .HasForeignKey("ProfileFamilyHistoryId"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCoupleHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CoupleHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCurrentAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("CurrentAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Disciplines") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDisciplineHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDiscipline", "ProfileDiscipline") - .WithMany("ProfileDisciplineHistorys") - .HasForeignKey("ProfileDisciplineId"); - - b.Navigation("ProfileDiscipline"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Dutys") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDutyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileDuty", "ProfileDuty") - .WithMany("ProfileDutyHistorys") - .HasForeignKey("ProfileDutyId"); - - b.Navigation("ProfileDuty"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Educations") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducationHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEducation", "ProfileEducation") - .WithMany("ProfileEducationHistorys") - .HasForeignKey("ProfileEducationId"); - - b.Navigation("ProfileEducation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmployment", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Employments") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEmploymentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileEmployment", "ProfileEmployment") - .WithMany() - .HasForeignKey("ProfileEmploymentId"); - - b.Navigation("ProfileEmployment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FamilyHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFatherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("FatherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileGovernmentHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("GovernmentHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("ProfileHistory") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Honors") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonorHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileHonor", "ProfileHonor") - .WithMany("ProfileHonorHistorys") - .HasForeignKey("ProfileHonorId"); - - b.Navigation("ProfileHonor"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Insignias") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileInsignia", "ProfileInsignia") - .WithMany("ProfileInsigniaHistorys") - .HasForeignKey("ProfileInsigniaId"); - - b.Navigation("ProfileInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null) - .WithMany("Leaves") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileLeave", "ProfileLeave") - .WithMany("ProfileLeaveHistorys") - .HasForeignKey("ProfileLeaveId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.TypeLeave", "TypeLeave") - .WithMany() - .HasForeignKey("TypeLeaveId"); - - b.Navigation("ProfileLeave"); - - b.Navigation("TypeLeave"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeaveSummary", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("LeaveSummary") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileMotherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("MotherHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Nopaids") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaidHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileNopaid", "ProfileNopaid") - .WithMany("ProfileNopaidHistorys") - .HasForeignKey("ProfileNopaidId"); - - b.Navigation("ProfileNopaid"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Others") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOtherHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileOther", "ProfileOther") - .WithMany("ProfileOtherHistorys") - .HasForeignKey("ProfileOtherId"); - - b.Navigation("ProfileOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfilePaper", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Papers") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileRegistrationAddressHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("RegistrationAddressHistory") - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Salaries") - .HasForeignKey("ProfileId"); - - b.Navigation("PositionLevel"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileSalary", "ProfileSalary") - .WithMany("ProfileSalaryHistorys") - .HasForeignKey("ProfileSalaryId"); - - b.Navigation("ProfileSalary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalaryPosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Position", "Position") - .WithMany() - .HasForeignKey("PositionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Position"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany("Trainings") - .HasForeignKey("ProfileId"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTrainingHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.ProfileTraining", "ProfileTraining") - .WithMany("ProfileTrainingHistorys") - .HasForeignKey("ProfileTrainingId"); - - b.Navigation("ProfileTraining"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod") - .WithMany("InsigniaEmployees") - .HasForeignKey("InsigniaPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "Insignia") - .WithMany() - .HasForeignKey("InsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Insignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManage", "InsigniaManage") - .WithMany("InsigniaManageOrganiations") - .HasForeignKey("InsigniaManageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManage"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", "InsigniaManageOrganiation") - .WithMany("InsigniaManageProfiles") - .HasForeignKey("InsigniaManageOrganiationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaManageOrganiation"); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteDocs") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("InsigniaNote"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReceiveInsignia") - .WithMany() - .HasForeignKey("DocReceiveInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocReturnInsignia") - .WithMany() - .HasForeignKey("DocReturnInsigniaId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNote", "InsigniaNote") - .WithMany("InsigniaNoteProfiles") - .HasForeignKey("InsigniaNoteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DocReceiveInsignia"); - - b.Navigation("DocReturnInsignia"); - - b.Navigation("InsigniaNote"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period") - .WithMany("InsigniaRequests") - .HasForeignKey("PeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("Period"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request") - .WithMany("RequestProfiles") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia") - .WithMany() - .HasForeignKey("RequestInsigniaId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Request"); - - b.Navigation("RequestInsignia"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "Province") - .WithMany("Districts") - .HasForeignKey("ProvinceId"); - - b.Navigation("Province"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Insignia", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.InsigniaType", "InsigniaType") - .WithMany() - .HasForeignKey("InsigniaTypeId"); - - b.Navigation("InsigniaType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Position", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "ExecutiveSide") - .WithMany() - .HasForeignKey("ExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PathSide") - .WithMany() - .HasForeignKey("PathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("ExecutiveSide"); - - b.Navigation("PathSide"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.SubDistrict", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "District") - .WithMany("SubDistricts") - .HasForeignKey("DistrictId"); - - b.Navigation("District"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationAgency") - .WithMany() - .HasForeignKey("OrganizationAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrganizationGovernmentAgency") - .WithMany() - .HasForeignKey("OrganizationGovernmentAgencyId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLine", "PositionEmployeeLine") - .WithMany() - .HasForeignKey("PositionEmployeeLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePosition", "PositionEmployeePosition") - .WithMany() - .HasForeignKey("PositionEmployeePositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeStatus", "PositionEmployeeStatus") - .WithMany() - .HasForeignKey("PositionEmployeeStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("Organization"); - - b.Navigation("OrganizationAgency"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationGovernmentAgency"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("PositionEmployeeLine"); - - b.Navigation("PositionEmployeePosition"); - - b.Navigation("PositionEmployeeStatus"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationEmployeeProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrgEmployee") - .WithMany("OrganizationEmployeeProfiles") - .HasForeignKey("OrgEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OrgEmployee"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeeLevel", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeeLevels") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeeLevel", "PositionEmployeeLevel") - .WithMany() - .HasForeignKey("PositionEmployeeLevelId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeeLevel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrganizationPositionEmployeePositionSide", b => - { - b.HasOne("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", "OrganizationEmployee") - .WithMany("OrganizationPositionEmployeePositionSides") - .HasForeignKey("OrganizationEmployeeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionEmployeePositionSide", "PositionEmployeePositionSide") - .WithMany() - .HasForeignKey("PositionEmployeePositionSideId"); - - b.Navigation("OrganizationEmployee"); - - b.Navigation("PositionEmployeePositionSide"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.AvailablePositionLevelEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionMaster"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax") - .WithMany() - .HasForeignKey("OrganizationFaxId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel") - .WithMany() - .HasForeignKey("OrganizationLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationOrganization", "OrganizationOrganization") - .WithMany() - .HasForeignKey("OrganizationOrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationStatus", "OrganizationStatus") - .WithMany() - .HasForeignKey("OrganizationStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelExternal", "OrganizationTelExternal") - .WithMany() - .HasForeignKey("OrganizationTelExternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationTelInternal", "OrganizationTelInternal") - .WithMany() - .HasForeignKey("OrganizationTelInternalId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationType", "OrganizationType") - .WithMany() - .HasForeignKey("OrganizationTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Parent") - .WithMany("Organizations") - .HasForeignKey("ParentId"); - - b.Navigation("OrganizationFax"); - - b.Navigation("OrganizationLevel"); - - b.Navigation("OrganizationOrganization"); - - b.Navigation("OrganizationShortName"); - - b.Navigation("OrganizationStatus"); - - b.Navigation("OrganizationTelExternal"); - - b.Navigation("OrganizationTelInternal"); - - b.Navigation("OrganizationType"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization") - .WithMany() - .HasForeignKey("OrganizationId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMaster") - .WithMany() - .HasForeignKey("PositionMasterId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.Navigation("Organization"); - - b.Navigation("PositionMaster"); - - b.Navigation("PositionNumber"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutive", "PositionExecutive") - .WithMany() - .HasForeignKey("PositionExecutiveId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionExecutiveSide", "PositionExecutiveSide") - .WithMany() - .HasForeignKey("PositionExecutiveSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionStatus", "PositionStatus") - .WithMany() - .HasForeignKey("PositionStatusId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.Navigation("PositionExecutive"); - - b.Navigation("PositionExecutiveSide"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionStatus"); - - b.Navigation("PositionType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterHistoryEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", "PositionMasterEntity") - .WithMany("PositionMasterHistorys") - .HasForeignKey("PositionMasterEntityId"); - - b.Navigation("PositionMasterEntity"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationShortName", "OrganizationShortName") - .WithMany() - .HasForeignKey("OrganizationShortNameId"); - - b.Navigation("OrganizationShortName"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.ProfilePosition", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.Report2.Report2History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Organizations.Report2.Report2DetailHistory", "Report2DetailHistory") - .WithMany() - .HasForeignKey("Report2DetailHistoryId"); - - b.Navigation("Report2DetailHistory"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementType", "PlacementType") - .WithMany() - .HasForeignKey("PlacementTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointmentDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementAppointment", "PlacementAppointment") - .WithMany("PlacementAppointmentDocs") - .HasForeignKey("PlacementAppointmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementAppointment"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementCertificate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementCertificates") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementEducation", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementEducations") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.Navigation("PlacementProfile"); - - b.Navigation("PositionPath"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement") - .WithMany("PlacementProfiles") - .HasForeignKey("PlacementId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg") - .WithMany() - .HasForeignKey("ProfileImgId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc") - .WithMany() - .HasForeignKey("ReliefDocId"); - - b.Navigation("Placement"); - - b.Navigation("ProfileImg"); - - b.Navigation("ReliefDoc"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementProfile", "PlacementProfile") - .WithMany("PlacementProfileDocs") - .HasForeignKey("PlacementProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementProfile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Avatar") - .WithMany() - .HasForeignKey("AvatarId"); - - b.Navigation("Avatar"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceiveDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementReceive", "PlacementReceive") - .WithMany("PlacementReceiveDocs") - .HasForeignKey("PlacementReceiveId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementReceive"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup") - .WithMany() - .HasForeignKey("BloodGroupId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender") - .WithMany() - .HasForeignKey("GenderId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition") - .WithMany() - .HasForeignKey("OrganizationPositionId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel") - .WithMany() - .HasForeignKey("PositionLevelId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine") - .WithMany() - .HasForeignKey("PositionLineId"); - - b.HasOne("BMA.EHR.Domain.Models.Organizations.PositionNumberEntity", "PositionNumber") - .WithMany() - .HasForeignKey("PositionNumberId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPath", "PositionPath") - .WithMany() - .HasForeignKey("PositionPathId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionPathSide", "PositionPathSide") - .WithMany() - .HasForeignKey("PositionPathSideId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType") - .WithMany() - .HasForeignKey("PositionTypeId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix") - .WithMany() - .HasForeignKey("PrefixId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship") - .WithMany() - .HasForeignKey("RelationshipId"); - - b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion") - .WithMany() - .HasForeignKey("ReligionId"); - - b.Navigation("BloodGroup"); - - b.Navigation("Gender"); - - b.Navigation("OrganizationPosition"); - - b.Navigation("PositionLevel"); - - b.Navigation("PositionLine"); - - b.Navigation("PositionNumber"); - - b.Navigation("PositionPath"); - - b.Navigation("PositionPathSide"); - - b.Navigation("PositionType"); - - b.Navigation("Prefix"); - - b.Navigation("Profile"); - - b.Navigation("Relationship"); - - b.Navigation("Religion"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocationDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementRelocation", "PlacementRelocation") - .WithMany("PlacementRelocationDocs") - .HasForeignKey("PlacementRelocationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementRelocation"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransferDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Placement.PlacementTransfer", "PlacementTransfer") - .WithMany("PlacementTransferDocs") - .HasForeignKey("PlacementTransferId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("PlacementTransfer"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "DocumentForward") - .WithMany() - .HasForeignKey("DocumentForwardId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - - b.Navigation("DocumentForward"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceasedNoti", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", "RetirementDeceased") - .WithMany("RetirementDeceasedNotis") - .HasForeignKey("RetirementDeceasedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementDeceased"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDischarge", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany() - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => - { - b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") - .WithMany() - .HasForeignKey("ProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Profile"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Commands.Core.CommandType", "CommandType") - .WithMany() - .HasForeignKey("CommandTypeId"); - - b.Navigation("CommandType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOtherDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementOther", "RetirementOther") - .WithMany("RetirementOtherDocs") - .HasForeignKey("RetirementOtherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementOther"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriodHistory", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementPeriodHistorys") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany() - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementRawProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod") - .WithMany("RetirementRawProfiles") - .HasForeignKey("RetirementPeriodId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementPeriod"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignCancels") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDebtDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("RetirementResignDocs") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResign"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeCancels") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDebtDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDoc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("RetirementResignEmployeeDocs") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("RetirementResignEmployee"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b => - { - b.Navigation("Deployments"); - - b.Navigation("Documents"); - - b.Navigation("Receivers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b => - { - b.Navigation("LimitTypeLeaves"); - - b.Navigation("Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b => - { - b.Navigation("Abilitys"); - - b.Navigation("AddressHistory"); - - b.Navigation("Assessments"); - - b.Navigation("AvatarHistory"); - - b.Navigation("Certificates"); - - b.Navigation("ChangeNames"); - - b.Navigation("Childrens"); - - b.Navigation("CoupleHistory"); - - b.Navigation("CurrentAddressHistory"); - - b.Navigation("Disciplines"); - - b.Navigation("Dutys"); - - b.Navigation("Educations"); - - b.Navigation("Employments"); - - b.Navigation("FamilyHistory"); - - b.Navigation("FatherHistory"); - - b.Navigation("GovernmentHistory"); - - b.Navigation("Honors"); - - b.Navigation("Insignias"); - - b.Navigation("LeaveSummary"); - - b.Navigation("Leaves"); - - b.Navigation("MotherHistory"); - - b.Navigation("Nopaids"); - - b.Navigation("Others"); - - b.Navigation("Papers"); - - b.Navigation("ProfileHistory"); - - b.Navigation("RegistrationAddressHistory"); - - b.Navigation("Salaries"); - - b.Navigation("Trainings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b => - { - b.Navigation("ProfileAbilityHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAssessment", b => - { - b.Navigation("ProfileAssessmentHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileCertificate", b => - { - b.Navigation("ProfileCertificateHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChangeName", b => - { - b.Navigation("ProfileChangeNameHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileChildren", b => - { - b.Navigation("ProfileChildrenHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDiscipline", b => - { - b.Navigation("ProfileDisciplineHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileDuty", b => - { - b.Navigation("ProfileDutyHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileEducation", b => - { - b.Navigation("ProfileEducationHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileFamilyHistory", b => - { - b.Navigation("Childrens"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileHonor", b => - { - b.Navigation("ProfileHonorHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsignia", b => - { - b.Navigation("ProfileInsigniaHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileLeave", b => - { - b.Navigation("ProfileLeaveHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileNopaid", b => - { - b.Navigation("ProfileNopaidHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileOther", b => - { - b.Navigation("ProfileOtherHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileSalary", b => - { - b.Navigation("ProfileSalaryHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileTraining", b => - { - b.Navigation("ProfileTrainingHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.HR.TypeLeave", b => - { - b.Navigation("LimitTypeLeaves"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b => - { - b.Navigation("InsigniaManageOrganiations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManageOrganiation", b => - { - b.Navigation("InsigniaManageProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaNote", b => - { - b.Navigation("InsigniaNoteDocs"); - - b.Navigation("InsigniaNoteProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", b => - { - b.Navigation("InsigniaEmployees"); - - b.Navigation("InsigniaRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => - { - b.Navigation("RequestProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.District", b => - { - b.Navigation("SubDistricts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.MetaData.Province", b => - { - b.Navigation("Districts"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.OrganizationEmployee.OrgEmployee", b => - { - b.Navigation("OrganizationEmployeeProfiles"); - - b.Navigation("OrganizationPositionEmployeeLevels"); - - b.Navigation("OrganizationPositionEmployeePositionSides"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b => - { - b.Navigation("Organizations"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.PositionMasterEntity", b => - { - b.Navigation("PositionMasterHistorys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.Placement", b => - { - b.Navigation("PlacementProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementAppointment", b => - { - b.Navigation("PlacementAppointmentDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b => - { - b.Navigation("PlacementCertificates"); - - b.Navigation("PlacementEducations"); - - b.Navigation("PlacementProfileDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementReceive", b => - { - b.Navigation("PlacementReceiveDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementRelocation", b => - { - b.Navigation("PlacementRelocationDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementTransfer", b => - { - b.Navigation("PlacementTransferDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementDeceased", b => - { - b.Navigation("RetirementDeceasedNotis"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementOther", b => - { - b.Navigation("RetirementOtherDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", b => - { - b.Navigation("RetirementPeriodHistorys"); - - b.Navigation("RetirementProfiles"); - - b.Navigation("RetirementRawProfiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignCancels"); - - b.Navigation("RetirementResignDebtDocs"); - - b.Navigation("RetirementResignDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => - { - b.Navigation("Approvers"); - - b.Navigation("RetirementResignEmployeeCancels"); - - b.Navigation("RetirementResignEmployeeDebtDocs"); - - b.Navigation("RetirementResignEmployeeDocs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.cs b/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.cs deleted file mode 100644 index aea9ff02..00000000 --- a/BMA.EHR.Infrastructure/Migrations/20260521081933_update_Tables_add_posExecutiveId.cs +++ /dev/null @@ -1,66 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations -{ - /// - public partial class update_Tables_add_posExecutiveId : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "posExecutiveId", - table: "RetirementOthers", - type: "longtext", - nullable: true, - comment: "id ตำแหน่งทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "posExecutiveId", - table: "PlacementReceives", - type: "longtext", - nullable: true, - comment: "id ตำแหน่งทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "posExecutiveId", - table: "PlacementProfiles", - type: "longtext", - nullable: true, - comment: "id ตำแหน่งทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "posExecutiveId", - table: "PlacementAppointments", - type: "longtext", - nullable: true, - comment: "id ตำแหน่งทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "posExecutiveId", - table: "RetirementOthers"); - - migrationBuilder.DropColumn( - name: "posExecutiveId", - table: "PlacementReceives"); - - migrationBuilder.DropColumn( - name: "posExecutiveId", - table: "PlacementProfiles"); - - migrationBuilder.DropColumn( - name: "posExecutiveId", - table: "PlacementAppointments"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs b/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs index 273e0978..fdfae870 100644 --- a/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs +++ b/BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs @@ -5832,9 +5832,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("char(36)") .HasComment("รหัสหน่วยงาน"); - b.Property("RootDnaId") - .HasColumnType("char(36)"); - b.Property("Total") .HasColumnType("int") .HasComment("จำนวนทั้งหมด"); @@ -6414,78 +6411,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.ToTable("InsigniaPeriods"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("InsigniaNoteProfileId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ReclaimDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่เรียกคืน"); - - b.Property("ReclaimOrganization") - .HasColumnType("longtext"); - - b.Property("ReclaimOrganizationId") - .HasColumnType("char(36)") - .HasComment("Fk Table OrganizationOrganization Borrow"); - - b.Property("ReclaimReason") - .HasColumnType("longtext") - .HasComment("เหตุผลในการเรียกคืน"); - - b.HasKey("Id"); - - b.HasIndex("InsigniaNoteProfileId"); - - b.ToTable("InsigniaReclaimProfiles"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => { b.Property("Id") @@ -6545,9 +6470,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.Property("PeriodId") .HasColumnType("char(36)"); - b.Property("ProfileType") - .HasColumnType("longtext"); - b.Property("RequestNote") .IsRequired() .HasColumnType("text"); @@ -6575,21 +6497,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasComment("PrimaryKey") .HasAnnotation("Relational:JsonPropertyName", "id"); - b.Property("APR1") - .HasColumnType("longtext"); - - b.Property("APR2") - .HasColumnType("longtext"); - - b.Property("APR3") - .HasColumnType("longtext"); - - b.Property("APR4") - .HasColumnType("longtext"); - - b.Property("APR5") - .HasColumnType("longtext"); - b.Property("Amount") .HasColumnType("double"); @@ -6695,9 +6602,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("tinyint(1)") .HasComment("แจ้งเตือน มีโทษทางวินัย"); - b.Property("MarkInsignia") - .HasColumnType("tinyint(1)"); - b.Property("MarkLeave") .HasColumnType("tinyint(1)") .HasComment("แจ้งเตือน ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน"); @@ -6710,21 +6614,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("text") .HasComment("รายละเอียดเครื่องราชฯที่ขอ"); - b.Property("OCT1") - .HasColumnType("longtext"); - - b.Property("OCT2") - .HasColumnType("longtext"); - - b.Property("OCT3") - .HasColumnType("longtext"); - - b.Property("OCT4") - .HasColumnType("longtext"); - - b.Property("OCT5") - .HasColumnType("longtext"); - b.Property("PosLevelName") .HasColumnType("longtext"); @@ -11721,10 +11610,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id revision"); - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - b.Property("posLevelId") .HasColumnType("longtext") .HasComment("id ระดับตำแหน่ง"); @@ -11769,22 +11654,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อตำแหน่งในสายงาน"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("positionField") .HasColumnType("longtext") .HasComment("สายงาน"); @@ -12495,22 +12364,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id ประเภทตำแหน่ง old"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("prefix") .HasColumnType("longtext") .HasComment("คำนำหน้า"); @@ -12801,8 +12654,8 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ"); - b.Property("OccupationSalary") - .HasColumnType("double") + b.Property("OccupationSalary") + .HasColumnType("int") .HasComment("ตำแหน่งปัจจุบัน เงินเดือน"); b.Property("OccupationTelephone") @@ -13112,10 +12965,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน"); - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - b.Property("posLevelId") .HasColumnType("longtext") .HasComment("id ระดับตำแหน่ง"); @@ -13156,22 +13005,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อประเภทตำแหน่ง"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("positionField") .HasColumnType("longtext") .HasComment("สายงาน"); @@ -13621,10 +13454,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id revision"); - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - b.Property("posLevelId") .HasColumnType("longtext") .HasComment("id ระดับตำแหน่ง"); @@ -13669,22 +13498,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อตำแหน่งในสายงาน"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("positionField") .HasColumnType("longtext") .HasComment("สายงาน"); @@ -13705,10 +13518,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("profile Id"); - b.Property("rank") - .HasColumnType("longtext") - .HasComment("ยศ"); - b.Property("root") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน root"); @@ -14266,22 +14075,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id ประเภทตำแหน่ง old"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("prefix") .HasColumnType("longtext") .HasComment("คำนำหน้า"); @@ -14511,22 +14304,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id ประเภทตำแหน่ง old"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("prefix") .HasColumnType("longtext") .HasComment("คำนำหน้า"); @@ -14944,22 +14721,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อตำแหน่งในสายงาน"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("prefix") .HasColumnType("longtext") .HasComment("คำนำหน้า"); @@ -15078,10 +14839,12 @@ namespace BMA.EHR.Infrastructure.Migrations .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); b.Property("OrganizationName") + .IsRequired() .HasColumnType("longtext") .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง"); b.Property("PositionName") + .IsRequired() .HasColumnType("longtext") .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง"); @@ -15205,239 +14968,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.ToTable("RetirementDischarges"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Adjust") - .HasColumnType("longtext") - .HasComment("อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AdjustOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง"); - - b.Property("AppointDate") - .HasColumnType("datetime(6)") - .HasComment("กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("ความคิดเห็น"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("ExitFactorOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ"); - - b.Property("FutureWork") - .HasColumnType("tinyint(1)") - .HasComment("หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("FutureWorkReason") - .HasColumnType("longtext") - .HasComment("เหตุผลหากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Havejob") - .HasColumnType("tinyint(1)") - .HasComment("ท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("HavejobReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านมีงานใหม่หรือไม่และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("NotExitFactor") - .HasColumnType("longtext") - .HasComment("ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("RealReason") - .HasColumnType("longtext") - .HasComment("โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"); - - b.Property("ReasonWork") - .HasColumnType("longtext") - .HasComment("เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("ReasonWorkOther") - .HasColumnType("longtext") - .HasComment("อื่นๆ เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Score1") - .HasColumnType("int") - .HasComment("คะแนนข้อ 1"); - - b.Property("Score10") - .HasColumnType("int") - .HasComment("คะแนนข้อ 10"); - - b.Property("Score2") - .HasColumnType("int") - .HasComment("คะแนนข้อ 2"); - - b.Property("Score3") - .HasColumnType("int") - .HasComment("คะแนนข้อ 3"); - - b.Property("Score4") - .HasColumnType("int") - .HasComment("คะแนนข้อ 4"); - - b.Property("Score5") - .HasColumnType("int") - .HasComment("คะแนนข้อ 5"); - - b.Property("Score6") - .HasColumnType("int") - .HasComment("คะแนนข้อ 6"); - - b.Property("Score7") - .HasColumnType("int") - .HasComment("คะแนนข้อ 7"); - - b.Property("Score8") - .HasColumnType("int") - .HasComment("คะแนนข้อ 8"); - - b.Property("Score9") - .HasColumnType("int") - .HasComment("คะแนนข้อ 9"); - - b.Property("ScoreTotal") - .HasColumnType("int") - .HasComment("คะแนนรวม"); - - b.Property("SuggestFriends") - .HasColumnType("tinyint(1)") - .HasComment("ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("SuggestFriendsReason") - .HasColumnType("longtext") - .HasComment("เหตุผลท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่"); - - b.Property("Suggestion") - .HasColumnType("longtext") - .HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ "); - - b.Property("TimeThink") - .HasColumnType("int") - .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementEmployeeQuestions"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => { b.Property("Id") @@ -15815,10 +15345,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id revision"); - b.Property("posExecutiveId") - .HasColumnType("longtext") - .HasComment("id ตำแหน่งทางการบริหาร"); - b.Property("posLevelId") .HasColumnType("longtext") .HasComment("id ระดับตำแหน่ง"); @@ -15863,22 +15389,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อตำแหน่งในสายงาน"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("positionField") .HasColumnType("longtext") .HasComment("สายงาน"); @@ -16196,22 +15706,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id ประเภทตำแหน่ง old"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("prefix") .HasColumnType("longtext") .HasComment("คำนำหน้า"); @@ -16608,22 +16102,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อตำแหน่งในสายงาน "); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("prefix") .HasColumnType("longtext") .HasComment("คำนำหน้า"); @@ -16821,66 +16299,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("int") .HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"); - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1 "); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 "); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2 "); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 "); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3 "); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 "); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4 "); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 "); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root "); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root "); - b.HasKey("Id"); b.HasIndex("RetirementResignId"); @@ -17228,22 +16646,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อตำแหน่งในสายงาน "); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("prefix") .HasColumnType("longtext") .HasComment("คำนำหน้า"); @@ -17292,10 +16694,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("เหตุผลอนุมัติ"); - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - b.Property("CancelReason") .HasColumnType("longtext") .HasComment("เหตุผลยกเลิก"); @@ -17335,10 +16733,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnOrder(101) .HasComment("User Id ที่สร้างข้อมูล"); - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - b.Property("IsActive") .HasColumnType("tinyint(1)") .HasComment("สถานะการใช้งาน"); @@ -17566,22 +16960,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id ประเภทตำแหน่ง old"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("prefix") .HasColumnType("longtext") .HasComment("คำนำหน้า"); @@ -17611,110 +16989,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.ToTable("RetirementResigns"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignId"); - - b.ToTable("RetirementResignApprovers"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => { b.Property("Id") @@ -17736,10 +17010,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("เหตุผลอนุมัติ"); - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - b.Property("CancelReason") .HasColumnType("longtext") .HasComment("เหตุผลยกเลิก"); @@ -17779,10 +17049,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnOrder(101) .HasComment("User Id ที่สร้างข้อมูล"); - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - b.Property("IsActive") .HasColumnType("tinyint(1)") .HasComment("สถานะการใช้งาน"); @@ -17909,10 +17175,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("สถานะลาออก"); - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - b.Property("child1Old") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child1 old"); @@ -17925,10 +17187,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน child1 old"); - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - b.Property("child2Old") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child2 old"); @@ -17941,10 +17199,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน child2 old"); - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - b.Property("child3Old") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child3 old"); @@ -17957,10 +17211,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน child3 old"); - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - b.Property("child4Old") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child4 old"); @@ -18005,22 +17255,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("id ประเภทตำแหน่ง old"); - b.Property("positionArea") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา"); - - b.Property("positionAreaOld") - .HasColumnType("longtext") - .HasComment("ด้าน/สาขา (เก่า)"); - - b.Property("positionExecutiveField") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร"); - - b.Property("positionExecutiveFieldOld") - .HasColumnType("longtext") - .HasComment("ด้านทางการบริหาร (เก่า)"); - b.Property("prefix") .HasColumnType("longtext") .HasComment("คำนำหน้า"); @@ -18029,10 +17263,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("profile Id"); - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - b.Property("rootOld") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน root old"); @@ -18052,106 +17282,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.ToTable("RetirementResignCancels"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignCancelId"); - - b.ToTable("RetirementResignCancelApprovers"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => { b.Property("Id") @@ -18297,10 +17427,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("เหตุผลอนุมัติ"); - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - b.Property("CancelReason") .HasColumnType("longtext") .HasComment("เหตุผลยกเลิก"); @@ -18340,10 +17466,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnOrder(101) .HasComment("User Id ที่สร้างข้อมูล"); - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - b.Property("IsActive") .HasColumnType("tinyint(1)") .HasComment("สถานะการใช้งาน"); @@ -18596,110 +17718,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.ToTable("RetirementResignEmployees"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionExecutiveName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeId"); - - b.ToTable("RetirementResignEmployeeApprovers"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => { b.Property("Id") @@ -18721,10 +17739,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("เหตุผลอนุมัติ"); - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - b.Property("CancelReason") .HasColumnType("longtext") .HasComment("เหตุผลยกเลิก"); @@ -18764,10 +17778,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnOrder(101) .HasComment("User Id ที่สร้างข้อมูล"); - b.Property("Group") - .HasColumnType("longtext") - .HasComment("คนยื่นมาอยู่ในกลุ่ม"); - b.Property("IsActive") .HasColumnType("tinyint(1)") .HasComment("สถานะการใช้งาน"); @@ -18890,10 +17900,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("สถานะลาออก"); - b.Property("child1DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1 old"); - b.Property("child1Old") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child1 old"); @@ -18906,10 +17912,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน child1 old"); - b.Property("child2DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2 old"); - b.Property("child2Old") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child2 old"); @@ -18922,10 +17924,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน child2 old"); - b.Property("child3DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3 old"); - b.Property("child3Old") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child3 old"); @@ -18938,10 +17936,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("ชื่อย่อหน่วยงาน child3 old"); - b.Property("child4DnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4 old"); - b.Property("child4Old") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน child4 old"); @@ -18994,10 +17988,6 @@ namespace BMA.EHR.Infrastructure.Migrations .HasColumnType("longtext") .HasComment("profile Id"); - b.Property("rootDnaOldId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root old"); - b.Property("rootOld") .HasColumnType("longtext") .HasComment("ชื่อหน่วยงาน root old"); @@ -19017,106 +18007,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.ToTable("RetirementResignEmployeeCancels"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Org") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("RejectDate") - .HasColumnType("datetime(6)"); - - b.Property("RetirementResignEmployeeCancelId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RetirementResignEmployeeCancelId"); - - b.ToTable("RetirementResignEmployeeCancelApprovers"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => { b.Property("Id") @@ -19989,17 +18879,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.Navigation("ReliefDoc"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaReclaimProfile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaNoteProfile", "InsigniaNoteProfile") - .WithMany() - .HasForeignKey("InsigniaNoteProfileId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("InsigniaNoteProfile"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", b => { b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") @@ -20704,17 +19583,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.Navigation("Profile"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementEmployeeQuestion", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany() - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementExpulsion", b => { b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile") @@ -20813,17 +19681,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.Navigation("RetirementPeriod"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") - .WithMany("Approvers") - .HasForeignKey("RetirementResignId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResign"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => { b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign") @@ -20835,17 +19692,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.Navigation("RetirementResign"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", "RetirementResignCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignCancel"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignDebtDoc", b => { b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") @@ -20884,17 +19730,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.Navigation("RetirementResign"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployee"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => { b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", "RetirementResignEmployee") @@ -20906,17 +19741,6 @@ namespace BMA.EHR.Infrastructure.Migrations b.Navigation("RetirementResignEmployee"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancelApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", "RetirementResignEmployeeCancel") - .WithMany("Approvers") - .HasForeignKey("RetirementResignEmployeeCancelId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("RetirementResignEmployeeCancel"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeDebtDoc", b => { b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") @@ -21228,8 +20052,6 @@ namespace BMA.EHR.Infrastructure.Migrations modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b => { - b.Navigation("Approvers"); - b.Navigation("RetirementResignCancels"); b.Navigation("RetirementResignDebtDocs"); @@ -21237,26 +20059,14 @@ namespace BMA.EHR.Infrastructure.Migrations b.Navigation("RetirementResignDocs"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b => - { - b.Navigation("Approvers"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployee", b => { - b.Navigation("Approvers"); - b.Navigation("RetirementResignEmployeeCancels"); b.Navigation("RetirementResignEmployeeDebtDocs"); b.Navigation("RetirementResignEmployeeDocs"); }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignEmployeeCancel", b => - { - b.Navigation("Approvers"); - }); #pragma warning restore 612, 618 } } diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417101128_update_table_disciplineresult_add_remark.Designer.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417101128_update_table_disciplineresult_add_remark.Designer.cs deleted file mode 100644 index a5f9d02b..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417101128_update_table_disciplineresult_add_remark.Designer.cs +++ /dev/null @@ -1,3599 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - [DbContext(typeof(DisciplineDbContext))] - [Migration("20250417101128_update_table_disciplineresult_add_remark")] - partial class update_table_disciplineresult_add_remark - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CaseNumber") - .HasColumnType("longtext") - .HasComment("คดีเลขที่"); - - b.Property("CaseType") - .HasColumnType("longtext") - .HasComment("ประเภทคดี"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องอุทธรณ์/ร้องทุกข์"); - - b.Property("Fullname") - .HasColumnType("longtext") - .HasComment("ชื่อ-นามสกุลผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัดผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("ProfileId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ProfileId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะอุทธรณ์/ร้องทุกข์"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่อุทธรณ์/ร้องทุกข์"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทอุทธรณ์หรือร้องทุกข์"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaint_Appeals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaint_AppealId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaint_AppealId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineComplaint_Appeal_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaint_AppealId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะอุทธรณ์/ร้องทุกข์"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaint_AppealId"); - - b.ToTable("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Channel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการร้องเรียน"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaint_Channels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineComplaint_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineComplaint_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Email") - .HasColumnType("longtext") - .HasComment("อีเมล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Phone") - .HasColumnType("longtext") - .HasComment("เบอร์โทรศัพท์"); - - b.Property("Position") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำนำหน้าชื่อ"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.ToTable("DisciplineDirectors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryCauseText") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน กรณีมีมูล"); - - b.Property("DisciplinaryDateAllegation") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับทราบข้อกล่าวหา"); - - b.Property("DisciplinaryDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสอบสวน"); - - b.Property("DisciplinaryDateEvident") - .HasColumnType("datetime(6)") - .HasComment("วันที่สรุปพยานหลักฐาน"); - - b.Property("DisciplinaryDateInvestigation") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีคำสั่งให้สอบสวน"); - - b.Property("DisciplinaryDateResult") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานผลการสอบสวน"); - - b.Property("DisciplinaryDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสอบสวน"); - - b.Property("DisciplinaryDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ขยาย"); - - b.Property("DisciplinaryExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplinaryFaultLevelOther") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิดกรณีอื่นๆ"); - - b.Property("DisciplinaryInvestigateAt") - .HasColumnType("longtext") - .HasComment("สอบสวนที่"); - - b.Property("DisciplinaryRecordAccuser") - .HasColumnType("longtext") - .HasComment("บันทึกถ้อยคำของผู้กล่าวหา"); - - b.Property("DisciplinaryRefLaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฎหมาย"); - - b.Property("DisciplinaryResult") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน เหตุผล"); - - b.Property("DisciplinaryStatusResult") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน ผล"); - - b.Property("DisciplinarySummaryEvidence") - .HasColumnType("longtext") - .HasComment("สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"); - - b.Property("DisciplinaryWitnesses") - .HasColumnType("longtext") - .HasComment("พยานและบันทึกถ้อยคำพยาน"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("InvestigationCauseText") - .HasColumnType("longtext") - .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'"); - - b.Property("InvestigationDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสืบสวน"); - - b.Property("InvestigationDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสืบสวน"); - - b.Property("InvestigationDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ต้องการขยาย"); - - b.Property("InvestigationDescription") - .HasColumnType("longtext") - .HasComment("รายละเอียดเกี่ยวกับการสืบสวน"); - - b.Property("InvestigationDetail") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวน (APPOINT_DIRECTORS คือ แต่งตั้งกรรมการสืบสวน, SECRET_INVESTIGATION คือ สืบสวนทางลับ, OTHER คือ อื่น ๆ)"); - - b.Property("InvestigationDetailOther") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ"); - - b.Property("InvestigationExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("InvestigationStatusResult") - .HasColumnType("longtext") - .HasComment("สถานะหรือผลการสืบสวน (NOT_SPECIFIED คือ ยังไม่ระบุ, HAVE_CAUSE คือ มีมูล, NO_CAUSE คือ ไม่มีมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("ResultComplaint") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - - b.Property("ResultDescription") - .HasColumnType("longtext") - .HasComment("สรุปผลการพิจารณา"); - - b.Property("ResultDisciplineType") - .HasColumnType("longtext") - .HasComment("ประเภทวินัย"); - - b.Property("ResultInvestigate") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องสืบสวน"); - - b.Property("ResultOc") - .HasColumnType("longtext") - .HasComment("หน่วยงาย/ส่วนราชการ"); - - b.Property("ResultTitleType") - .HasColumnType("longtext") - .HasComment("ประเภทของเรื่อง"); - - b.Property("ResultYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineDisciplinarys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("DaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่การขยาย"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อการขยาย"); - - b.Property("Num") - .HasColumnType("int") - .HasComment("ครั้งที่ขยาย"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinaryExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_DirectorInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocInvestigateRelevants"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocRecordAccusers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocRelevants"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocResults"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocSummaryEvidences"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocWitnessess"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandDiscardCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeDiscardId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("IsSuspend") - .HasColumnType("longtext") - .HasComment("ส่งไปพักราชการ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Offense") - .HasColumnType("longtext") - .HasComment("ฐานความผิดรายบุคคล"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("ฐานความผิดรายบุคคลหมายเหตุ"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("StatusDiscard") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่งงดโทด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("InvestigationCauseText") - .HasColumnType("longtext") - .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'"); - - b.Property("InvestigationDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสืบสวน"); - - b.Property("InvestigationDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสืบสวน"); - - b.Property("InvestigationDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ต้องการขยาย"); - - b.Property("InvestigationDescription") - .HasColumnType("longtext") - .HasComment("รายละเอียดเกี่ยวกับการสืบสวน"); - - b.Property("InvestigationDetail") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวน (appoint_directors คือ แต่งตั้งกรรมการสืบสวน, secret_investigation คือ สืบสวนทางลับ, other คือ อื่น ๆ)"); - - b.Property("InvestigationDetailOther") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ"); - - b.Property("InvestigationExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("InvestigationStatusResult") - .HasColumnType("longtext") - .HasComment("สถานะหรือผลการสืบสวน (not_specified คือ ยังไม่ระบุ, have_cause คือ มีมูล, no_cause คือ ไม่มีมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("ResultComplaint") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("DaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่การขยาย"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อการขยาย"); - - b.Property("Num") - .HasColumnType("int") - .HasComment("ครั้งที่ขยาย"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigateExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigateRelevant_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_DocComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentRejectId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsDisciplinary") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปสอบสวน"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("RemarkReject") - .HasColumnType("longtext") - .HasComment("หมายเหตุยุติเรื่อง"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentRejectId"); - - b.ToTable("DisciplineInvestigate_ProfileComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DescriptionSuspend") - .HasColumnType("longtext") - .HasComment("เหตุที่ถูกสั่งพักราชการ/ออกจากราชการไว้ก่อน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("EndDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการสั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("StartDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineReport_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.ProfileComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("commandType") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่งลงโทษทางวินัย (C-PM-19->คำสั่งลงโทษปลดออกจากราชการ C-PM-20->คำสั่งลงโทษไล่ออกจากราชการ)"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.HasKey("Id"); - - b.ToTable("ProfileComplaintInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Docs") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Historys") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Docs") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Profiles") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineDisciplinarys") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinaryExtends") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigateRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocOthers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRecordAccusers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocResults") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocSummaryEvidences") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocWitnessess") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_ProfileComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineInvestigates") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateExtends") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateRelevant_Docs") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineInvestigate_Directors") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_Directors") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_Docs") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_DocComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_ProfileComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "DocumentReject") - .WithMany() - .HasForeignKey("DocumentRejectId"); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("DocumentReject"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany() - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Navigation("DisciplineComplaint_Docs"); - - b.Navigation("DisciplineComplaint_Profiles"); - - b.Navigation("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Navigation("DisciplineComplaint_Appeal_Docs"); - - b.Navigation("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Navigation("DisciplineDisciplinaryExtends"); - - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocComplaintInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocInvestigateRelevants"); - - b.Navigation("DisciplineDisciplinary_DocInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocOthers"); - - b.Navigation("DisciplineDisciplinary_DocRecordAccusers"); - - b.Navigation("DisciplineDisciplinary_DocRelevants"); - - b.Navigation("DisciplineDisciplinary_DocResults"); - - b.Navigation("DisciplineDisciplinary_DocSummaryEvidences"); - - b.Navigation("DisciplineDisciplinary_DocWitnessess"); - - b.Navigation("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Navigation("DisciplineDisciplinarys"); - - b.Navigation("DisciplineInvestigateExtends"); - - b.Navigation("DisciplineInvestigateRelevant_Docs"); - - b.Navigation("DisciplineInvestigate_Directors"); - - b.Navigation("DisciplineInvestigate_DocComplaints"); - - b.Navigation("DisciplineInvestigate_Docs"); - - b.Navigation("DisciplineInvestigate_ProfileComplaints"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417101128_update_table_disciplineresult_add_remark.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417101128_update_table_disciplineresult_add_remark.cs deleted file mode 100644 index bc1d5878..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417101128_update_table_disciplineresult_add_remark.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - /// - public partial class update_table_disciplineresult_add_remark : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "DocumentRejectId", - table: "DisciplineInvestigate_ProfileComplaints", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "RemarkReject", - table: "DisciplineInvestigate_ProfileComplaints", - type: "longtext", - nullable: true, - comment: "หมายเหตุยุติเรื่อง") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Offense", - table: "DisciplineDisciplinary_ProfileComplaintInvestigates", - type: "longtext", - nullable: true, - comment: "ฐานความผิดรายบุคคล") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Remark", - table: "DisciplineDisciplinary_ProfileComplaintInvestigates", - type: "longtext", - nullable: true, - comment: "ฐานความผิดรายบุคคลหมายเหตุ") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_DisciplineInvestigate_ProfileComplaints_DocumentRejectId", - table: "DisciplineInvestigate_ProfileComplaints", - column: "DocumentRejectId"); - - migrationBuilder.AddForeignKey( - name: "FK_DisciplineInvestigate_ProfileComplaints_Documents_DocumentRe~", - table: "DisciplineInvestigate_ProfileComplaints", - column: "DocumentRejectId", - principalTable: "Documents", - principalColumn: "Id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_DisciplineInvestigate_ProfileComplaints_Documents_DocumentRe~", - table: "DisciplineInvestigate_ProfileComplaints"); - - migrationBuilder.DropIndex( - name: "IX_DisciplineInvestigate_ProfileComplaints_DocumentRejectId", - table: "DisciplineInvestigate_ProfileComplaints"); - - migrationBuilder.DropColumn( - name: "DocumentRejectId", - table: "DisciplineInvestigate_ProfileComplaints"); - - migrationBuilder.DropColumn( - name: "RemarkReject", - table: "DisciplineInvestigate_ProfileComplaints"); - - migrationBuilder.DropColumn( - name: "Offense", - table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); - - migrationBuilder.DropColumn( - name: "Remark", - table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417153725_update_table_disciplineresult_add_remark1.Designer.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417153725_update_table_disciplineresult_add_remark1.Designer.cs deleted file mode 100644 index d29cf032..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417153725_update_table_disciplineresult_add_remark1.Designer.cs +++ /dev/null @@ -1,3611 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - [DbContext(typeof(DisciplineDbContext))] - [Migration("20250417153725_update_table_disciplineresult_add_remark1")] - partial class update_table_disciplineresult_add_remark1 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CaseNumber") - .HasColumnType("longtext") - .HasComment("คดีเลขที่"); - - b.Property("CaseType") - .HasColumnType("longtext") - .HasComment("ประเภทคดี"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องอุทธรณ์/ร้องทุกข์"); - - b.Property("Fullname") - .HasColumnType("longtext") - .HasComment("ชื่อ-นามสกุลผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัดผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("ProfileId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ProfileId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะอุทธรณ์/ร้องทุกข์"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่อุทธรณ์/ร้องทุกข์"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทอุทธรณ์หรือร้องทุกข์"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaint_Appeals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaint_AppealId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaint_AppealId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineComplaint_Appeal_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaint_AppealId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะอุทธรณ์/ร้องทุกข์"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaint_AppealId"); - - b.ToTable("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Channel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการร้องเรียน"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaint_Channels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineComplaint_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineComplaint_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Email") - .HasColumnType("longtext") - .HasComment("อีเมล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Phone") - .HasColumnType("longtext") - .HasComment("เบอร์โทรศัพท์"); - - b.Property("Position") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำนำหน้าชื่อ"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.ToTable("DisciplineDirectors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryCauseText") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน กรณีมีมูล"); - - b.Property("DisciplinaryDateAllegation") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับทราบข้อกล่าวหา"); - - b.Property("DisciplinaryDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสอบสวน"); - - b.Property("DisciplinaryDateEvident") - .HasColumnType("datetime(6)") - .HasComment("วันที่สรุปพยานหลักฐาน"); - - b.Property("DisciplinaryDateInvestigation") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีคำสั่งให้สอบสวน"); - - b.Property("DisciplinaryDateResult") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานผลการสอบสวน"); - - b.Property("DisciplinaryDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสอบสวน"); - - b.Property("DisciplinaryDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ขยาย"); - - b.Property("DisciplinaryExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplinaryFaultLevelOther") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิดกรณีอื่นๆ"); - - b.Property("DisciplinaryInvestigateAt") - .HasColumnType("longtext") - .HasComment("สอบสวนที่"); - - b.Property("DisciplinaryRecordAccuser") - .HasColumnType("longtext") - .HasComment("บันทึกถ้อยคำของผู้กล่าวหา"); - - b.Property("DisciplinaryRefLaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฎหมาย"); - - b.Property("DisciplinaryResult") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน เหตุผล"); - - b.Property("DisciplinaryStatusResult") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน ผล"); - - b.Property("DisciplinarySummaryEvidence") - .HasColumnType("longtext") - .HasComment("สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"); - - b.Property("DisciplinaryWitnesses") - .HasColumnType("longtext") - .HasComment("พยานและบันทึกถ้อยคำพยาน"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("InvestigationCauseText") - .HasColumnType("longtext") - .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'"); - - b.Property("InvestigationDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสืบสวน"); - - b.Property("InvestigationDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสืบสวน"); - - b.Property("InvestigationDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ต้องการขยาย"); - - b.Property("InvestigationDescription") - .HasColumnType("longtext") - .HasComment("รายละเอียดเกี่ยวกับการสืบสวน"); - - b.Property("InvestigationDetail") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวน (APPOINT_DIRECTORS คือ แต่งตั้งกรรมการสืบสวน, SECRET_INVESTIGATION คือ สืบสวนทางลับ, OTHER คือ อื่น ๆ)"); - - b.Property("InvestigationDetailOther") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ"); - - b.Property("InvestigationExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("InvestigationStatusResult") - .HasColumnType("longtext") - .HasComment("สถานะหรือผลการสืบสวน (NOT_SPECIFIED คือ ยังไม่ระบุ, HAVE_CAUSE คือ มีมูล, NO_CAUSE คือ ไม่มีมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("ResultComplaint") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - - b.Property("ResultDescription") - .HasColumnType("longtext") - .HasComment("สรุปผลการพิจารณา"); - - b.Property("ResultDisciplineType") - .HasColumnType("longtext") - .HasComment("ประเภทวินัย"); - - b.Property("ResultInvestigate") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องสืบสวน"); - - b.Property("ResultOc") - .HasColumnType("longtext") - .HasComment("หน่วยงาย/ส่วนราชการ"); - - b.Property("ResultTitleType") - .HasColumnType("longtext") - .HasComment("ประเภทของเรื่อง"); - - b.Property("ResultYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineDisciplinarys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("DaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่การขยาย"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อการขยาย"); - - b.Property("Num") - .HasColumnType("int") - .HasComment("ครั้งที่ขยาย"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinaryExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_DirectorInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocInvestigateRelevants"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocRecordAccusers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocRelevants"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocResults"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocSummaryEvidences"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocWitnessess"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandDiscardCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeDiscardId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("IsSuspend") - .HasColumnType("longtext") - .HasComment("ส่งไปพักราชการ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Offense") - .HasColumnType("longtext") - .HasComment("ฐานความผิดรายบุคคล"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("ฐานความผิดรายบุคคลหมายเหตุ"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("StatusDiscard") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่งงดโทด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("InvestigationCauseText") - .HasColumnType("longtext") - .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'"); - - b.Property("InvestigationDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสืบสวน"); - - b.Property("InvestigationDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสืบสวน"); - - b.Property("InvestigationDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ต้องการขยาย"); - - b.Property("InvestigationDescription") - .HasColumnType("longtext") - .HasComment("รายละเอียดเกี่ยวกับการสืบสวน"); - - b.Property("InvestigationDetail") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวน (appoint_directors คือ แต่งตั้งกรรมการสืบสวน, secret_investigation คือ สืบสวนทางลับ, other คือ อื่น ๆ)"); - - b.Property("InvestigationDetailOther") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ"); - - b.Property("InvestigationExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("InvestigationStatusResult") - .HasColumnType("longtext") - .HasComment("สถานะหรือผลการสืบสวน (not_specified คือ ยังไม่ระบุ, have_cause คือ มีมูล, no_cause คือ ไม่มีมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("ResultComplaint") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("DaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่การขยาย"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อการขยาย"); - - b.Property("Num") - .HasColumnType("int") - .HasComment("ครั้งที่ขยาย"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigateExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigateRelevant_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_DocComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentRejectId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsDisciplinary") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปสอบสวน"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("RemarkReject") - .HasColumnType("longtext") - .HasComment("หมายเหตุยุติเรื่อง"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentRejectId"); - - b.ToTable("DisciplineInvestigate_ProfileComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DescriptionSuspend") - .HasColumnType("longtext") - .HasComment("เหตุที่ถูกสั่งพักราชการ/ออกจากราชการไว้ก่อน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("EndDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการสั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("StartDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineReport_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.ProfileComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("commandType") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่งลงโทษทางวินัย (C-PM-19->คำสั่งลงโทษปลดออกจากราชการ C-PM-20->คำสั่งลงโทษไล่ออกจากราชการ)"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.HasKey("Id"); - - b.ToTable("ProfileComplaintInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Docs") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Historys") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Docs") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Profiles") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineDisciplinarys") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinaryExtends") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigateRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocOthers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRecordAccusers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocResults") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocSummaryEvidences") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocWitnessess") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_ProfileComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineInvestigates") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateExtends") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateRelevant_Docs") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineInvestigate_Directors") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_Directors") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_Docs") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_DocComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_ProfileComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "DocumentReject") - .WithMany() - .HasForeignKey("DocumentRejectId"); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("DocumentReject"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany() - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Navigation("DisciplineComplaint_Docs"); - - b.Navigation("DisciplineComplaint_Profiles"); - - b.Navigation("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Navigation("DisciplineComplaint_Appeal_Docs"); - - b.Navigation("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Navigation("DisciplineDisciplinaryExtends"); - - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocComplaintInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocInvestigateRelevants"); - - b.Navigation("DisciplineDisciplinary_DocInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocOthers"); - - b.Navigation("DisciplineDisciplinary_DocRecordAccusers"); - - b.Navigation("DisciplineDisciplinary_DocRelevants"); - - b.Navigation("DisciplineDisciplinary_DocResults"); - - b.Navigation("DisciplineDisciplinary_DocSummaryEvidences"); - - b.Navigation("DisciplineDisciplinary_DocWitnessess"); - - b.Navigation("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Navigation("DisciplineDisciplinarys"); - - b.Navigation("DisciplineInvestigateExtends"); - - b.Navigation("DisciplineInvestigateRelevant_Docs"); - - b.Navigation("DisciplineInvestigate_Directors"); - - b.Navigation("DisciplineInvestigate_DocComplaints"); - - b.Navigation("DisciplineInvestigate_Docs"); - - b.Navigation("DisciplineInvestigate_ProfileComplaints"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417153725_update_table_disciplineresult_add_remark1.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417153725_update_table_disciplineresult_add_remark1.cs deleted file mode 100644 index eb7aab6e..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250417153725_update_table_disciplineresult_add_remark1.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - /// - public partial class update_table_disciplineresult_add_remark1 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "DisciplineInvestigates", - type: "char(36)", - nullable: true, - comment: "RootDnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "DisciplineDisciplinarys", - type: "char(36)", - nullable: true, - comment: "RootDnaId", - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "DisciplineComplaints", - type: "char(36)", - nullable: true, - comment: "RootDnaId", - collation: "ascii_general_ci"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "DisciplineInvestigates"); - - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "DisciplineDisciplinarys"); - - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "DisciplineComplaints"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250421073757_update_table_disciplineresult_add_remark2.Designer.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250421073757_update_table_disciplineresult_add_remark2.Designer.cs deleted file mode 100644 index 189094de..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250421073757_update_table_disciplineresult_add_remark2.Designer.cs +++ /dev/null @@ -1,3611 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - [DbContext(typeof(DisciplineDbContext))] - [Migration("20250421073757_update_table_disciplineresult_add_remark2")] - partial class update_table_disciplineresult_add_remark2 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CaseNumber") - .HasColumnType("longtext") - .HasComment("คดีเลขที่"); - - b.Property("CaseType") - .HasColumnType("longtext") - .HasComment("ประเภทคดี"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องอุทธรณ์/ร้องทุกข์"); - - b.Property("Fullname") - .HasColumnType("longtext") - .HasComment("ชื่อ-นามสกุลผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัดผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("ProfileId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ProfileId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะอุทธรณ์/ร้องทุกข์"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่อุทธรณ์/ร้องทุกข์"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทอุทธรณ์หรือร้องทุกข์"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaint_Appeals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaint_AppealId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaint_AppealId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineComplaint_Appeal_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaint_AppealId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะอุทธรณ์/ร้องทุกข์"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaint_AppealId"); - - b.ToTable("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Channel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการร้องเรียน"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaint_Channels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineComplaint_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineComplaint_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Email") - .HasColumnType("longtext") - .HasComment("อีเมล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Phone") - .HasColumnType("longtext") - .HasComment("เบอร์โทรศัพท์"); - - b.Property("Position") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำนำหน้าชื่อ"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.ToTable("DisciplineDirectors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryCauseText") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน กรณีมีมูล"); - - b.Property("DisciplinaryDateAllegation") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับทราบข้อกล่าวหา"); - - b.Property("DisciplinaryDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสอบสวน"); - - b.Property("DisciplinaryDateEvident") - .HasColumnType("datetime(6)") - .HasComment("วันที่สรุปพยานหลักฐาน"); - - b.Property("DisciplinaryDateInvestigation") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีคำสั่งให้สอบสวน"); - - b.Property("DisciplinaryDateResult") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานผลการสอบสวน"); - - b.Property("DisciplinaryDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสอบสวน"); - - b.Property("DisciplinaryDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ขยาย"); - - b.Property("DisciplinaryExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplinaryFaultLevelOther") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิดกรณีอื่นๆ"); - - b.Property("DisciplinaryInvestigateAt") - .HasColumnType("longtext") - .HasComment("สอบสวนที่"); - - b.Property("DisciplinaryRecordAccuser") - .HasColumnType("longtext") - .HasComment("บันทึกถ้อยคำของผู้กล่าวหา"); - - b.Property("DisciplinaryRefLaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฎหมาย"); - - b.Property("DisciplinaryResult") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน เหตุผล"); - - b.Property("DisciplinaryStatusResult") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน ผล"); - - b.Property("DisciplinarySummaryEvidence") - .HasColumnType("longtext") - .HasComment("สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"); - - b.Property("DisciplinaryWitnesses") - .HasColumnType("longtext") - .HasComment("พยานและบันทึกถ้อยคำพยาน"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("InvestigationCauseText") - .HasColumnType("longtext") - .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'"); - - b.Property("InvestigationDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสืบสวน"); - - b.Property("InvestigationDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสืบสวน"); - - b.Property("InvestigationDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ต้องการขยาย"); - - b.Property("InvestigationDescription") - .HasColumnType("longtext") - .HasComment("รายละเอียดเกี่ยวกับการสืบสวน"); - - b.Property("InvestigationDetail") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวน (APPOINT_DIRECTORS คือ แต่งตั้งกรรมการสืบสวน, SECRET_INVESTIGATION คือ สืบสวนทางลับ, OTHER คือ อื่น ๆ)"); - - b.Property("InvestigationDetailOther") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ"); - - b.Property("InvestigationExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("InvestigationStatusResult") - .HasColumnType("longtext") - .HasComment("สถานะหรือผลการสืบสวน (NOT_SPECIFIED คือ ยังไม่ระบุ, HAVE_CAUSE คือ มีมูล, NO_CAUSE คือ ไม่มีมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("ResultComplaint") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - - b.Property("ResultDescription") - .HasColumnType("longtext") - .HasComment("สรุปผลการพิจารณา"); - - b.Property("ResultDisciplineType") - .HasColumnType("longtext") - .HasComment("ประเภทวินัย"); - - b.Property("ResultInvestigate") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องสืบสวน"); - - b.Property("ResultOc") - .HasColumnType("longtext") - .HasComment("หน่วยงาย/ส่วนราชการ"); - - b.Property("ResultTitleType") - .HasColumnType("longtext") - .HasComment("ประเภทของเรื่อง"); - - b.Property("ResultYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineDisciplinarys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("DaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่การขยาย"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อการขยาย"); - - b.Property("Num") - .HasColumnType("int") - .HasComment("ครั้งที่ขยาย"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinaryExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_DirectorInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocInvestigateRelevants"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocRecordAccusers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocRelevants"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocResults"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocSummaryEvidences"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocWitnessess"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandDiscardCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeDiscardId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("IsSuspend") - .HasColumnType("longtext") - .HasComment("ส่งไปพักราชการ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Offense") - .HasColumnType("longtext") - .HasComment("ฐานความผิดรายบุคคล"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Remark") - .HasColumnType("text") - .HasComment("ฐานความผิดรายบุคคลหมายเหตุ"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("StatusDiscard") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่งงดโทด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("InvestigationCauseText") - .HasColumnType("longtext") - .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'"); - - b.Property("InvestigationDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสืบสวน"); - - b.Property("InvestigationDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสืบสวน"); - - b.Property("InvestigationDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ต้องการขยาย"); - - b.Property("InvestigationDescription") - .HasColumnType("longtext") - .HasComment("รายละเอียดเกี่ยวกับการสืบสวน"); - - b.Property("InvestigationDetail") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวน (appoint_directors คือ แต่งตั้งกรรมการสืบสวน, secret_investigation คือ สืบสวนทางลับ, other คือ อื่น ๆ)"); - - b.Property("InvestigationDetailOther") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ"); - - b.Property("InvestigationExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("InvestigationStatusResult") - .HasColumnType("longtext") - .HasComment("สถานะหรือผลการสืบสวน (not_specified คือ ยังไม่ระบุ, have_cause คือ มีมูล, no_cause คือ ไม่มีมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("ResultComplaint") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("DaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่การขยาย"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อการขยาย"); - - b.Property("Num") - .HasColumnType("int") - .HasComment("ครั้งที่ขยาย"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigateExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigateRelevant_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_DocComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentRejectId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsDisciplinary") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปสอบสวน"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("RemarkReject") - .HasColumnType("longtext") - .HasComment("หมายเหตุยุติเรื่อง"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentRejectId"); - - b.ToTable("DisciplineInvestigate_ProfileComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DescriptionSuspend") - .HasColumnType("longtext") - .HasComment("เหตุที่ถูกสั่งพักราชการ/ออกจากราชการไว้ก่อน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("EndDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการสั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("StartDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineReport_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.ProfileComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("commandType") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่งลงโทษทางวินัย (C-PM-19->คำสั่งลงโทษปลดออกจากราชการ C-PM-20->คำสั่งลงโทษไล่ออกจากราชการ)"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.HasKey("Id"); - - b.ToTable("ProfileComplaintInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Docs") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Historys") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Docs") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Profiles") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineDisciplinarys") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinaryExtends") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigateRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocOthers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRecordAccusers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocResults") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocSummaryEvidences") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocWitnessess") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_ProfileComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineInvestigates") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateExtends") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateRelevant_Docs") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineInvestigate_Directors") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_Directors") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_Docs") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_DocComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_ProfileComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "DocumentReject") - .WithMany() - .HasForeignKey("DocumentRejectId"); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("DocumentReject"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany() - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Navigation("DisciplineComplaint_Docs"); - - b.Navigation("DisciplineComplaint_Profiles"); - - b.Navigation("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Navigation("DisciplineComplaint_Appeal_Docs"); - - b.Navigation("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Navigation("DisciplineDisciplinaryExtends"); - - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocComplaintInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocInvestigateRelevants"); - - b.Navigation("DisciplineDisciplinary_DocInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocOthers"); - - b.Navigation("DisciplineDisciplinary_DocRecordAccusers"); - - b.Navigation("DisciplineDisciplinary_DocRelevants"); - - b.Navigation("DisciplineDisciplinary_DocResults"); - - b.Navigation("DisciplineDisciplinary_DocSummaryEvidences"); - - b.Navigation("DisciplineDisciplinary_DocWitnessess"); - - b.Navigation("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Navigation("DisciplineDisciplinarys"); - - b.Navigation("DisciplineInvestigateExtends"); - - b.Navigation("DisciplineInvestigateRelevant_Docs"); - - b.Navigation("DisciplineInvestigate_Directors"); - - b.Navigation("DisciplineInvestigate_DocComplaints"); - - b.Navigation("DisciplineInvestigate_Docs"); - - b.Navigation("DisciplineInvestigate_ProfileComplaints"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250421073757_update_table_disciplineresult_add_remark2.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250421073757_update_table_disciplineresult_add_remark2.cs deleted file mode 100644 index d010dd34..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250421073757_update_table_disciplineresult_add_remark2.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - /// - public partial class update_table_disciplineresult_add_remark2 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Remark", - table: "DisciplineDisciplinary_ProfileComplaintInvestigates", - type: "text", - nullable: true, - comment: "ฐานความผิดรายบุคคลหมายเหตุ", - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true, - oldComment: "ฐานความผิดรายบุคคลหมายเหตุ") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Remark", - table: "DisciplineDisciplinary_ProfileComplaintInvestigates", - type: "longtext", - nullable: true, - comment: "ฐานความผิดรายบุคคลหมายเหตุ", - oldClrType: typeof(string), - oldType: "text", - oldNullable: true, - oldComment: "ฐานความผิดรายบุคคลหมายเหตุ") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250619175842_update_table_discipline_add_dna.Designer.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250619175842_update_table_discipline_add_dna.Designer.cs deleted file mode 100644 index cac9ad19..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250619175842_update_table_discipline_add_dna.Designer.cs +++ /dev/null @@ -1,3671 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - [DbContext(typeof(DisciplineDbContext))] - [Migration("20250619175842_update_table_discipline_add_dna")] - partial class update_table_discipline_add_dna - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CaseNumber") - .HasColumnType("longtext") - .HasComment("คดีเลขที่"); - - b.Property("CaseType") - .HasColumnType("longtext") - .HasComment("ประเภทคดี"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องอุทธรณ์/ร้องทุกข์"); - - b.Property("Fullname") - .HasColumnType("longtext") - .HasComment("ชื่อ-นามสกุลผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัดผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("ProfileId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ProfileId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะอุทธรณ์/ร้องทุกข์"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่อุทธรณ์/ร้องทุกข์"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทอุทธรณ์หรือร้องทุกข์"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaint_Appeals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaint_AppealId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaint_AppealId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineComplaint_Appeal_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaint_AppealId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะอุทธรณ์/ร้องทุกข์"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaint_AppealId"); - - b.ToTable("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Channel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการร้องเรียน"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaint_Channels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineComplaint_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineComplaint_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Email") - .HasColumnType("longtext") - .HasComment("อีเมล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Phone") - .HasColumnType("longtext") - .HasComment("เบอร์โทรศัพท์"); - - b.Property("Position") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำนำหน้าชื่อ"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.HasKey("Id"); - - b.ToTable("DisciplineDirectors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryCauseText") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน กรณีมีมูล"); - - b.Property("DisciplinaryDateAllegation") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับทราบข้อกล่าวหา"); - - b.Property("DisciplinaryDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสอบสวน"); - - b.Property("DisciplinaryDateEvident") - .HasColumnType("datetime(6)") - .HasComment("วันที่สรุปพยานหลักฐาน"); - - b.Property("DisciplinaryDateInvestigation") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีคำสั่งให้สอบสวน"); - - b.Property("DisciplinaryDateResult") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานผลการสอบสวน"); - - b.Property("DisciplinaryDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสอบสวน"); - - b.Property("DisciplinaryDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ขยาย"); - - b.Property("DisciplinaryExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplinaryFaultLevelOther") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิดกรณีอื่นๆ"); - - b.Property("DisciplinaryInvestigateAt") - .HasColumnType("longtext") - .HasComment("สอบสวนที่"); - - b.Property("DisciplinaryRecordAccuser") - .HasColumnType("longtext") - .HasComment("บันทึกถ้อยคำของผู้กล่าวหา"); - - b.Property("DisciplinaryRefLaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฎหมาย"); - - b.Property("DisciplinaryResult") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน เหตุผล"); - - b.Property("DisciplinaryStatusResult") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน ผล"); - - b.Property("DisciplinarySummaryEvidence") - .HasColumnType("longtext") - .HasComment("สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"); - - b.Property("DisciplinaryWitnesses") - .HasColumnType("longtext") - .HasComment("พยานและบันทึกถ้อยคำพยาน"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("InvestigationCauseText") - .HasColumnType("longtext") - .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'"); - - b.Property("InvestigationDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสืบสวน"); - - b.Property("InvestigationDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสืบสวน"); - - b.Property("InvestigationDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ต้องการขยาย"); - - b.Property("InvestigationDescription") - .HasColumnType("longtext") - .HasComment("รายละเอียดเกี่ยวกับการสืบสวน"); - - b.Property("InvestigationDetail") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวน (APPOINT_DIRECTORS คือ แต่งตั้งกรรมการสืบสวน, SECRET_INVESTIGATION คือ สืบสวนทางลับ, OTHER คือ อื่น ๆ)"); - - b.Property("InvestigationDetailOther") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ"); - - b.Property("InvestigationExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("InvestigationStatusResult") - .HasColumnType("longtext") - .HasComment("สถานะหรือผลการสืบสวน (NOT_SPECIFIED คือ ยังไม่ระบุ, HAVE_CAUSE คือ มีมูล, NO_CAUSE คือ ไม่มีมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("ResultComplaint") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - - b.Property("ResultDescription") - .HasColumnType("longtext") - .HasComment("สรุปผลการพิจารณา"); - - b.Property("ResultDisciplineType") - .HasColumnType("longtext") - .HasComment("ประเภทวินัย"); - - b.Property("ResultInvestigate") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องสืบสวน"); - - b.Property("ResultOc") - .HasColumnType("longtext") - .HasComment("หน่วยงาย/ส่วนราชการ"); - - b.Property("ResultTitleType") - .HasColumnType("longtext") - .HasComment("ประเภทของเรื่อง"); - - b.Property("ResultYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineDisciplinarys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("DaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่การขยาย"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อการขยาย"); - - b.Property("Num") - .HasColumnType("int") - .HasComment("ครั้งที่ขยาย"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinaryExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_DirectorInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocInvestigateRelevants"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocRecordAccusers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocRelevants"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocResults"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocSummaryEvidences"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocWitnessess"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandDiscardCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeDiscardId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("IsSuspend") - .HasColumnType("longtext") - .HasComment("ส่งไปพักราชการ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Offense") - .HasColumnType("longtext") - .HasComment("ฐานความผิดรายบุคคล"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Remark") - .HasColumnType("text") - .HasComment("ฐานความผิดรายบุคคลหมายเหตุ"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("StatusDiscard") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่งงดโทด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("InvestigationCauseText") - .HasColumnType("longtext") - .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'"); - - b.Property("InvestigationDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสืบสวน"); - - b.Property("InvestigationDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสืบสวน"); - - b.Property("InvestigationDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ต้องการขยาย"); - - b.Property("InvestigationDescription") - .HasColumnType("longtext") - .HasComment("รายละเอียดเกี่ยวกับการสืบสวน"); - - b.Property("InvestigationDetail") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวน (appoint_directors คือ แต่งตั้งกรรมการสืบสวน, secret_investigation คือ สืบสวนทางลับ, other คือ อื่น ๆ)"); - - b.Property("InvestigationDetailOther") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ"); - - b.Property("InvestigationExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("InvestigationStatusResult") - .HasColumnType("longtext") - .HasComment("สถานะหรือผลการสืบสวน (not_specified คือ ยังไม่ระบุ, have_cause คือ มีมูล, no_cause คือ ไม่มีมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("ResultComplaint") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("DaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่การขยาย"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อการขยาย"); - - b.Property("Num") - .HasColumnType("int") - .HasComment("ครั้งที่ขยาย"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigateExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigateRelevant_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_DocComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentRejectId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsDisciplinary") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปสอบสวน"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("RemarkReject") - .HasColumnType("longtext") - .HasComment("หมายเหตุยุติเรื่อง"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentRejectId"); - - b.ToTable("DisciplineInvestigate_ProfileComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DescriptionSuspend") - .HasColumnType("longtext") - .HasComment("เหตุที่ถูกสั่งพักราชการ/ออกจากราชการไว้ก่อน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("EndDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการสั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("StartDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineReport_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.ProfileComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("commandType") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่งลงโทษทางวินัย (C-PM-19->คำสั่งลงโทษปลดออกจากราชการ C-PM-20->คำสั่งลงโทษไล่ออกจากราชการ)"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.HasKey("Id"); - - b.ToTable("ProfileComplaintInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Docs") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Historys") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Docs") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Profiles") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineDisciplinarys") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinaryExtends") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigateRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocOthers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRecordAccusers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocResults") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocSummaryEvidences") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocWitnessess") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_ProfileComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineInvestigates") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateExtends") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateRelevant_Docs") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineInvestigate_Directors") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_Directors") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_Docs") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_DocComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_ProfileComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "DocumentReject") - .WithMany() - .HasForeignKey("DocumentRejectId"); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("DocumentReject"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany() - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Navigation("DisciplineComplaint_Docs"); - - b.Navigation("DisciplineComplaint_Profiles"); - - b.Navigation("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Navigation("DisciplineComplaint_Appeal_Docs"); - - b.Navigation("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Navigation("DisciplineDisciplinaryExtends"); - - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocComplaintInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocInvestigateRelevants"); - - b.Navigation("DisciplineDisciplinary_DocInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocOthers"); - - b.Navigation("DisciplineDisciplinary_DocRecordAccusers"); - - b.Navigation("DisciplineDisciplinary_DocRelevants"); - - b.Navigation("DisciplineDisciplinary_DocResults"); - - b.Navigation("DisciplineDisciplinary_DocSummaryEvidences"); - - b.Navigation("DisciplineDisciplinary_DocWitnessess"); - - b.Navigation("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Navigation("DisciplineDisciplinarys"); - - b.Navigation("DisciplineInvestigateExtends"); - - b.Navigation("DisciplineInvestigateRelevant_Docs"); - - b.Navigation("DisciplineInvestigate_Directors"); - - b.Navigation("DisciplineInvestigate_DocComplaints"); - - b.Navigation("DisciplineInvestigate_Docs"); - - b.Navigation("DisciplineInvestigate_ProfileComplaints"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250619175842_update_table_discipline_add_dna.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250619175842_update_table_discipline_add_dna.cs deleted file mode 100644 index 8f8db0e1..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250619175842_update_table_discipline_add_dna.cs +++ /dev/null @@ -1,198 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - /// - public partial class update_table_discipline_add_dna : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "child1", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงาน child1") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child1DnaId", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child1") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child1Id", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child1") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child2", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงาน child2") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child2DnaId", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child2") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child2Id", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child2") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child3", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงาน child3") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child3DnaId", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child3") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child3Id", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child3") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child4", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงาน child4") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child4DnaId", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child4") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "child4Id", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน child4") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "root", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "ชื่อหน่วยงาน root") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "rootDnaId", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน root") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "rootId", - table: "DisciplineComplaint_Appeals", - type: "longtext", - nullable: true, - comment: "id หน่วยงาน root") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "child1", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child1DnaId", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child1Id", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child2", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child2DnaId", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child2Id", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child3", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child3DnaId", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child3Id", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child4", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child4DnaId", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "child4Id", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "root", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "rootDnaId", - table: "DisciplineComplaint_Appeals"); - - migrationBuilder.DropColumn( - name: "rootId", - table: "DisciplineComplaint_Appeals"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250731105111_update_table_DisciplineDirector_add_RootDnaId.Designer.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250731105111_update_table_DisciplineDirector_add_RootDnaId.Designer.cs deleted file mode 100644 index f11a8f23..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250731105111_update_table_DisciplineDirector_add_RootDnaId.Designer.cs +++ /dev/null @@ -1,3675 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - [DbContext(typeof(DisciplineDbContext))] - [Migration("20250731105111_update_table_DisciplineDirector_add_RootDnaId")] - partial class update_table_DisciplineDirector_add_RootDnaId - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CaseNumber") - .HasColumnType("longtext") - .HasComment("คดีเลขที่"); - - b.Property("CaseType") - .HasColumnType("longtext") - .HasComment("ประเภทคดี"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องอุทธรณ์/ร้องทุกข์"); - - b.Property("Fullname") - .HasColumnType("longtext") - .HasComment("ชื่อ-นามสกุลผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Oc") - .HasColumnType("longtext") - .HasComment("สังกัดผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้อุทธรณ์/ร้องทุกข์"); - - b.Property("ProfileId") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ProfileId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะอุทธรณ์/ร้องทุกข์"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่อุทธรณ์/ร้องทุกข์"); - - b.Property("Type") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทอุทธรณ์หรือร้องทุกข์"); - - b.Property("Year") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaint_Appeals"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaint_AppealId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaint_AppealId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineComplaint_Appeal_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaint_AppealId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะอุทธรณ์/ร้องทุกข์"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaint_AppealId"); - - b.ToTable("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Channel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการร้องเรียน"); - - b.HasKey("Id"); - - b.ToTable("DisciplineComplaint_Channels"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineComplaint_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineComplaint_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Email") - .HasColumnType("longtext") - .HasComment("อีเมล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Phone") - .HasColumnType("longtext") - .HasComment("เบอร์โทรศัพท์"); - - b.Property("Position") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำนำหน้าชื่อ"); - - b.Property("Qualification") - .HasColumnType("longtext") - .HasComment("คุณวุฒิ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.HasKey("Id"); - - b.ToTable("DisciplineDirectors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryCauseText") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน กรณีมีมูล"); - - b.Property("DisciplinaryDateAllegation") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับทราบข้อกล่าวหา"); - - b.Property("DisciplinaryDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสอบสวน"); - - b.Property("DisciplinaryDateEvident") - .HasColumnType("datetime(6)") - .HasComment("วันที่สรุปพยานหลักฐาน"); - - b.Property("DisciplinaryDateInvestigation") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีคำสั่งให้สอบสวน"); - - b.Property("DisciplinaryDateResult") - .HasColumnType("datetime(6)") - .HasComment("วันที่รายงานผลการสอบสวน"); - - b.Property("DisciplinaryDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสอบสวน"); - - b.Property("DisciplinaryDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ขยาย"); - - b.Property("DisciplinaryExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplinaryFaultLevelOther") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิดกรณีอื่นๆ"); - - b.Property("DisciplinaryInvestigateAt") - .HasColumnType("longtext") - .HasComment("สอบสวนที่"); - - b.Property("DisciplinaryRecordAccuser") - .HasColumnType("longtext") - .HasComment("บันทึกถ้อยคำของผู้กล่าวหา"); - - b.Property("DisciplinaryRefLaw") - .HasColumnType("longtext") - .HasComment("อ้างอิงมาตราตามกฎหมาย"); - - b.Property("DisciplinaryResult") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน เหตุผล"); - - b.Property("DisciplinaryStatusResult") - .HasColumnType("longtext") - .HasComment("ผลการสอบสวน ผล"); - - b.Property("DisciplinarySummaryEvidence") - .HasColumnType("longtext") - .HasComment("สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"); - - b.Property("DisciplinaryWitnesses") - .HasColumnType("longtext") - .HasComment("พยานและบันทึกถ้อยคำพยาน"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("InvestigationCauseText") - .HasColumnType("longtext") - .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'"); - - b.Property("InvestigationDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสืบสวน"); - - b.Property("InvestigationDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสืบสวน"); - - b.Property("InvestigationDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ต้องการขยาย"); - - b.Property("InvestigationDescription") - .HasColumnType("longtext") - .HasComment("รายละเอียดเกี่ยวกับการสืบสวน"); - - b.Property("InvestigationDetail") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวน (APPOINT_DIRECTORS คือ แต่งตั้งกรรมการสืบสวน, SECRET_INVESTIGATION คือ สืบสวนทางลับ, OTHER คือ อื่น ๆ)"); - - b.Property("InvestigationDetailOther") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ"); - - b.Property("InvestigationExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("InvestigationStatusResult") - .HasColumnType("longtext") - .HasComment("สถานะหรือผลการสืบสวน (NOT_SPECIFIED คือ ยังไม่ระบุ, HAVE_CAUSE คือ มีมูล, NO_CAUSE คือ ไม่มีมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("ResultComplaint") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - - b.Property("ResultDescription") - .HasColumnType("longtext") - .HasComment("สรุปผลการพิจารณา"); - - b.Property("ResultDisciplineType") - .HasColumnType("longtext") - .HasComment("ประเภทวินัย"); - - b.Property("ResultInvestigate") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องสืบสวน"); - - b.Property("ResultOc") - .HasColumnType("longtext") - .HasComment("หน่วยงาย/ส่วนราชการ"); - - b.Property("ResultTitleType") - .HasColumnType("longtext") - .HasComment("ประเภทของเรื่อง"); - - b.Property("ResultYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineDisciplinarys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("DaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่การขยาย"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อการขยาย"); - - b.Property("Num") - .HasColumnType("int") - .HasComment("ครั้งที่ขยาย"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinaryExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_DirectorInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocInvestigateRelevants"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocOthers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocRecordAccusers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocRelevants"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocResults"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocSummaryEvidences"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineDisciplinary_DocWitnessess"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandDiscardCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeDiscardId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่งงดโทด"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("IsSuspend") - .HasColumnType("longtext") - .HasComment("ส่งไปพักราชการ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Offense") - .HasColumnType("longtext") - .HasComment("ฐานความผิดรายบุคคล"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Remark") - .HasColumnType("text") - .HasComment("ฐานความผิดรายบุคคลหมายเหตุ"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("StatusDiscard") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่งงดโทด"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Appellant") - .HasColumnType("longtext") - .HasComment("ผู้ร้องเรียน"); - - b.Property("ComplaintFrom") - .HasColumnType("longtext") - .HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)"); - - b.Property("ConsideredAgency") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง"); - - b.Property("ConsideredAgencyId") - .HasColumnType("longtext") - .HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateConsideration") - .HasColumnType("datetime(6)") - .HasComment("วันที่กำหนดพิจารณา"); - - b.Property("DateNotification") - .HasColumnType("datetime(6)") - .HasComment("วันแจ้งเตือนล่วงหน้า"); - - b.Property("DateReceived") - .HasColumnType("datetime(6)") - .HasComment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ"); - - b.Property("Description") - .HasColumnType("text") - .HasComment("รายละเอียดของเรื่องร้องเรียน"); - - b.Property("DisciplineComplaintId") - .HasColumnType("char(36)"); - - b.Property("InvestigationCauseText") - .HasColumnType("longtext") - .HasComment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'"); - - b.Property("InvestigationDateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุดการสืบสวน"); - - b.Property("InvestigationDateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่มการสืบสวน"); - - b.Property("InvestigationDaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่ต้องการขยาย"); - - b.Property("InvestigationDescription") - .HasColumnType("longtext") - .HasComment("รายละเอียดเกี่ยวกับการสืบสวน"); - - b.Property("InvestigationDetail") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวน (appoint_directors คือ แต่งตั้งกรรมการสืบสวน, secret_investigation คือ สืบสวนทางลับ, other คือ อื่น ๆ)"); - - b.Property("InvestigationDetailOther") - .HasColumnType("longtext") - .HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ"); - - b.Property("InvestigationExtendStatus") - .HasColumnType("tinyint(1)") - .HasComment("ขยายเวลา"); - - b.Property("InvestigationStatusResult") - .HasColumnType("longtext") - .HasComment("สถานะหรือผลการสืบสวน (not_specified คือ ยังไม่ระบุ, have_cause คือ มีมูล, no_cause คือ ไม่มีมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LevelConsideration") - .HasColumnType("longtext") - .HasComment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน"); - - b.Property("OrganizationId") - .HasColumnType("longtext") - .HasComment("กรณีหน่วยงานใส่หน่วยงาน id"); - - b.Property("RespondentType") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)"); - - b.Property("Result") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบ"); - - b.Property("ResultComplaint") - .HasColumnType("longtext") - .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("activeId") - .HasColumnType("longtext") - .HasComment("version หน่วยงาน"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineComplaintId"); - - b.ToTable("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateEnd") - .HasColumnType("datetime(6)") - .HasComment("วันที่สิ้นสุด"); - - b.Property("DateStart") - .HasColumnType("datetime(6)") - .HasComment("วันที่เริ่ม"); - - b.Property("DaysExtend") - .HasColumnType("int") - .HasComment("จำนวนวันที่การขยาย"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Name") - .HasColumnType("longtext") - .HasComment("ชื่อการขยาย"); - - b.Property("Num") - .HasColumnType("int") - .HasComment("ครั้งที่ขยาย"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigateExtends"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigateRelevant_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CommandNo") - .HasColumnType("longtext") - .HasComment("เลขที่คำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineDirectorId") - .HasColumnType("char(36)"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("Duty") - .HasColumnType("longtext") - .HasComment("หน้าที่"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDirectorId"); - - b.HasIndex("DisciplineInvestigateId"); - - b.ToTable("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_Docs"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentId"); - - b.ToTable("DisciplineInvestigate_DocComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DisciplineInvestigateId") - .HasColumnType("char(36)"); - - b.Property("DocumentRejectId") - .HasColumnType("char(36)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("IsAncestorDNA") - .HasColumnType("tinyint(1)") - .HasComment("รายการเก่า"); - - b.Property("IsDisciplinary") - .HasColumnType("tinyint(1)") - .HasComment("ส่งไปสอบสวน"); - - b.Property("IsReport") - .HasColumnType("longtext") - .HasComment("ส่งไปยุติเรื่อง"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("RemarkReject") - .HasColumnType("longtext") - .HasComment("หมายเหตุยุติเรื่อง"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineInvestigateId"); - - b.HasIndex("DocumentRejectId"); - - b.ToTable("DisciplineInvestigate_ProfileComplaints"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CommandCode") - .HasColumnType("longtext") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CommandTypeId") - .HasColumnType("char(36)") - .HasComment("ประเภทออกคำสั่ง"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DescriptionSuspend") - .HasColumnType("longtext") - .HasComment("เหตุที่ถูกสั่งพักราชการ/ออกจากราชการไว้ก่อน"); - - b.Property("DisciplinaryCaseFault") - .HasColumnType("longtext") - .HasComment("กรณีความผิด"); - - b.Property("DisciplinaryFaultLevel") - .HasColumnType("longtext") - .HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก"); - - b.Property("DisciplineDisciplinaryId") - .HasColumnType("char(36)"); - - b.Property("EndDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุดการสั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("OffenseDetails") - .HasColumnType("longtext") - .HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)"); - - b.Property("Organization") - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("PosNo") - .HasColumnType("longtext") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("Position") - .HasColumnType("longtext") - .HasComment("ตำแหน่ง"); - - b.Property("PositionLevel") - .HasColumnType("longtext") - .HasComment("ระดับ"); - - b.Property("PositionType") - .HasColumnType("longtext") - .HasComment("ประเภท"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("Salary") - .HasColumnType("double") - .HasComment("เงินเดือน"); - - b.Property("StartDateSuspend") - .HasColumnType("datetime(6)") - .HasComment("วันที่สั่งพักราชการ/ให้ออกจากราชการไว้ก่อน"); - - b.Property("Status") - .HasColumnType("longtext") - .HasComment("สถานะออกคำสั่ง"); - - b.Property("Title") - .HasColumnType("text") - .HasComment("เรื่องที่ร้องเรียน"); - - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4ShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน child4"); - - b.Property("posLevelId") - .HasColumnType("longtext") - .HasComment("id ระดับตำแหน่ง"); - - b.Property("posLevelName") - .HasColumnType("longtext") - .HasComment("ชื่อระดับตำแหน่ง"); - - b.Property("posMasterNo") - .HasColumnType("int") - .HasComment("เลขที่ตำแหน่ง"); - - b.Property("posTypeId") - .HasColumnType("longtext") - .HasComment("id ประเภทตำแหน่ง"); - - b.Property("posTypeName") - .HasColumnType("longtext") - .HasComment("ชื่อประเภทตำแหน่ง"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootShortName") - .HasColumnType("longtext") - .HasComment("ชื่อย่อหน่วยงาน root"); - - b.HasKey("Id"); - - b.HasIndex("DisciplineDisciplinaryId"); - - b.ToTable("DisciplineReport_Profiles"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.ProfileComplaintInvestigate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CitizenId") - .HasMaxLength(13) - .HasColumnType("varchar(13)") - .HasComment("รหัสบัตรประชาชน"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("ชื่อ"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasComment("นามสกุล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("PersonId") - .HasColumnType("longtext") - .HasComment("id อ้างอิง profile"); - - b.Property("Prefix") - .HasColumnType("longtext") - .HasComment("คำนำหน้า"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1Dna"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2Dna"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3Dna"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4Dna"); - - b.Property("commandType") - .HasColumnType("longtext") - .HasComment("ประเภทคำสั่งลงโทษทางวินัย (C-PM-19->คำสั่งลงโทษปลดออกจากราชการ C-PM-20->คำสั่งลงโทษไล่ออกจากราชการ)"); - - b.Property("profileType") - .HasColumnType("longtext") - .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน rootDna"); - - b.HasKey("Id"); - - b.ToTable("ProfileComplaintInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Docs") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal_History", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", "DisciplineComplaint_Appeal") - .WithMany("DisciplineComplaint_Appeal_Historys") - .HasForeignKey("DisciplineComplaint_AppealId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint_Appeal"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Docs") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineComplaint_Profiles") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineDisciplinarys") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinaryExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinaryExtends") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DirectorInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DirectorInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocInvestigateRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocInvestigateRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocOther", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocOthers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRecordAccuser", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRecordAccusers") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocRelevant", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocRelevants") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocResult", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocResults") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocSummaryEvidence", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocSummaryEvidences") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_DocWitnesses", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_DocWitnessess") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany("DisciplineDisciplinary_ProfileComplaintInvestigates") - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", "DisciplineComplaint") - .WithMany("DisciplineInvestigates") - .HasForeignKey("DisciplineComplaintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineComplaint"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateExtend", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateExtends") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigateRelevant_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigateRelevant_Docs") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Director", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", "DisciplineDirector") - .WithMany("DisciplineInvestigate_Directors") - .HasForeignKey("DisciplineDirectorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_Directors") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDirector"); - - b.Navigation("DisciplineInvestigate"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_Doc", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_Docs") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_DocComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_DocComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate_ProfileComplaint", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", "DisciplineInvestigate") - .WithMany("DisciplineInvestigate_ProfileComplaints") - .HasForeignKey("DisciplineInvestigateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "DocumentReject") - .WithMany() - .HasForeignKey("DocumentRejectId"); - - b.Navigation("DisciplineInvestigate"); - - b.Navigation("DocumentReject"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => - { - b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary") - .WithMany() - .HasForeignKey("DisciplineDisciplinaryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DisciplineDisciplinary"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint", b => - { - b.Navigation("DisciplineComplaint_Docs"); - - b.Navigation("DisciplineComplaint_Profiles"); - - b.Navigation("DisciplineInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineComplaint_Appeal", b => - { - b.Navigation("DisciplineComplaint_Appeal_Docs"); - - b.Navigation("DisciplineComplaint_Appeal_Historys"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDirector", b => - { - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineInvestigate_Directors"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", b => - { - b.Navigation("DisciplineDisciplinaryExtends"); - - b.Navigation("DisciplineDisciplinary_DirectorInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocComplaintInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocInvestigateRelevants"); - - b.Navigation("DisciplineDisciplinary_DocInvestigates"); - - b.Navigation("DisciplineDisciplinary_DocOthers"); - - b.Navigation("DisciplineDisciplinary_DocRecordAccusers"); - - b.Navigation("DisciplineDisciplinary_DocRelevants"); - - b.Navigation("DisciplineDisciplinary_DocResults"); - - b.Navigation("DisciplineDisciplinary_DocSummaryEvidences"); - - b.Navigation("DisciplineDisciplinary_DocWitnessess"); - - b.Navigation("DisciplineDisciplinary_ProfileComplaintInvestigates"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineInvestigate", b => - { - b.Navigation("DisciplineDisciplinarys"); - - b.Navigation("DisciplineInvestigateExtends"); - - b.Navigation("DisciplineInvestigateRelevant_Docs"); - - b.Navigation("DisciplineInvestigate_Directors"); - - b.Navigation("DisciplineInvestigate_DocComplaints"); - - b.Navigation("DisciplineInvestigate_Docs"); - - b.Navigation("DisciplineInvestigate_ProfileComplaints"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250731105111_update_table_DisciplineDirector_add_RootDnaId.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250731105111_update_table_DisciplineDirector_add_RootDnaId.cs deleted file mode 100644 index 891d818e..00000000 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20250731105111_update_table_DisciplineDirector_add_RootDnaId.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb -{ - /// - public partial class update_table_DisciplineDirector_add_RootDnaId : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "DisciplineDirectors", - type: "char(36)", - nullable: true, - comment: "RootDnaId", - collation: "ascii_general_ci"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "DisciplineDirectors"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/DisciplineDbContextModelSnapshot.cs b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/DisciplineDbContextModelSnapshot.cs index 21889f3c..26d50619 100644 --- a/BMA.EHR.Infrastructure/Migrations/DisciplineDb/DisciplineDbContextModelSnapshot.cs +++ b/BMA.EHR.Infrastructure/Migrations/DisciplineDb/DisciplineDbContextModelSnapshot.cs @@ -123,10 +123,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnType("longtext") .HasComment("ผลการตรวจสอบ"); - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - b.Property("Status") .IsRequired() .HasColumnType("longtext") @@ -245,70 +241,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnType("int") .HasComment("ปีงบประมาณ"); - b.Property("child1") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child1"); - - b.Property("child1DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child1Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child1"); - - b.Property("child2") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child2"); - - b.Property("child2DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child2Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child2"); - - b.Property("child3") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child3"); - - b.Property("child3DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child3Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child3"); - - b.Property("child4") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน child4"); - - b.Property("child4DnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - - b.Property("child4Id") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน child4"); - b.Property("profileType") .HasColumnType("longtext") .HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)"); - b.Property("root") - .HasColumnType("longtext") - .HasComment("ชื่อหน่วยงาน root"); - - b.Property("rootDnaId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - - b.Property("rootId") - .HasColumnType("longtext") - .HasComment("id หน่วยงาน root"); - b.HasKey("Id"); b.ToTable("DisciplineComplaint_Appeals"); @@ -842,10 +778,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnType("longtext") .HasComment("คุณวุฒิ"); - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - b.HasKey("Id"); b.ToTable("DisciplineDirectors"); @@ -1098,10 +1030,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnType("int") .HasComment("ปีงบประมาณ"); - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - b.Property("Status") .IsRequired() .HasColumnType("longtext") @@ -1923,10 +1851,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnOrder(102) .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - b.Property("Offense") - .HasColumnType("longtext") - .HasComment("ฐานความผิดรายบุคคล"); - b.Property("Organization") .HasColumnType("longtext") .HasComment("สังกัด"); @@ -1947,10 +1871,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnType("longtext") .HasComment("คำนำหน้า"); - b.Property("Remark") - .HasColumnType("text") - .HasComment("ฐานความผิดรายบุคคลหมายเหตุ"); - b.Property("Salary") .HasColumnType("double") .HasComment("เงินเดือน"); @@ -2221,10 +2141,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnType("longtext") .HasComment("ผลการตรวจสอบเรื่องร้องเรียน"); - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("RootDnaId"); - b.Property("Status") .IsRequired() .HasColumnType("longtext") @@ -2615,9 +2531,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb b.Property("DisciplineInvestigateId") .HasColumnType("char(36)"); - b.Property("DocumentRejectId") - .HasColumnType("char(36)"); - b.Property("FirstName") .IsRequired() .HasMaxLength(100) @@ -2681,10 +2594,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .HasColumnType("longtext") .HasComment("คำนำหน้า"); - b.Property("RemarkReject") - .HasColumnType("longtext") - .HasComment("หมายเหตุยุติเรื่อง"); - b.Property("Salary") .HasColumnType("double") .HasComment("เงินเดือน"); @@ -2797,8 +2706,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb b.HasIndex("DisciplineInvestigateId"); - b.HasIndex("DocumentRejectId"); - b.ToTable("DisciplineInvestigate_ProfileComplaints"); }); @@ -3580,13 +3487,7 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("BMA.EHR.Domain.Models.Discipline.Document", "DocumentReject") - .WithMany() - .HasForeignKey("DocumentRejectId"); - b.Navigation("DisciplineInvestigate"); - - b.Navigation("DocumentReject"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b => diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409082848_Add Leave SubType.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409082848_Add Leave SubType.Designer.cs deleted file mode 100644 index 50070c0a..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409082848_Add Leave SubType.Designer.cs +++ /dev/null @@ -1,1368 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250409082848_Add Leave SubType")] - partial class AddLeaveSubType - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลา"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409082848_Add Leave SubType.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409082848_Add Leave SubType.cs deleted file mode 100644 index 14411688..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409082848_Add Leave SubType.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddLeaveSubType : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "LeaveSubTypeName", - table: "LeaveRequests", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LeaveSubTypeName", - table: "LeaveRequests"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409090154_Add Leave CommanderPosition.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409090154_Add Leave CommanderPosition.Designer.cs deleted file mode 100644 index 6c2f91c0..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409090154_Add Leave CommanderPosition.Designer.cs +++ /dev/null @@ -1,1371 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250409090154_Add Leave CommanderPosition")] - partial class AddLeaveCommanderPosition - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลา"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409090154_Add Leave CommanderPosition.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409090154_Add Leave CommanderPosition.cs deleted file mode 100644 index ce1c055d..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250409090154_Add Leave CommanderPosition.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddLeaveCommanderPosition : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "CommanderPosition", - table: "LeaveRequests", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "CommanderPosition", - table: "LeaveRequests"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250417022255_Add LeaveApprovers.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250417022255_Add LeaveApprovers.Designer.cs deleted file mode 100644 index 85f4c8e5..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250417022255_Add LeaveApprovers.Designer.cs +++ /dev/null @@ -1,1474 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250417022255_Add LeaveApprovers")] - partial class AddLeaveApprovers - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลา"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250417022255_Add LeaveApprovers.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250417022255_Add LeaveApprovers.cs deleted file mode 100644 index 13894111..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250417022255_Add LeaveApprovers.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddLeaveApprovers : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "LeaveRequestApprovers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), - CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), - LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - LeaveRequestId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Seq = table.Column(type: "int", nullable: false), - Prefix = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - PositionName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProfileId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - KeycloakId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApproveStatus = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Comment = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_LeaveRequestApprovers", x => x.Id); - table.ForeignKey( - name: "FK_LeaveRequestApprovers_LeaveRequests_LeaveRequestId", - column: x => x.LeaveRequestId, - principalTable: "LeaveRequests", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_LeaveRequestApprovers_LeaveRequestId", - table: "LeaveRequestApprovers", - column: "LeaveRequestId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "LeaveRequestApprovers"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250421230201_Add Leave Range End.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250421230201_Add Leave Range End.Designer.cs deleted file mode 100644 index bb34e16f..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250421230201_Add Leave Range End.Designer.cs +++ /dev/null @@ -1,1478 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250421230201_Add Leave Range End")] - partial class AddLeaveRangeEnd - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลา"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250421230201_Add Leave Range End.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250421230201_Add Leave Range End.cs deleted file mode 100644 index 7a267852..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250421230201_Add Leave Range End.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddLeaveRangeEnd : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "LeaveRange", - table: "LeaveRequests", - type: "longtext", - nullable: true, - comment: "ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย", - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true, - oldComment: "ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "LeaveRangeEnd", - table: "LeaveRequests", - type: "longtext", - nullable: true, - comment: "ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LeaveRangeEnd", - table: "LeaveRequests"); - - migrationBuilder.AlterColumn( - name: "LeaveRange", - table: "LeaveRequests", - type: "longtext", - nullable: true, - comment: "ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย", - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true, - oldComment: "ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250422065634_Add Approver Type.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250422065634_Add Approver Type.Designer.cs deleted file mode 100644 index 8e5e5319..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250422065634_Add Approver Type.Designer.cs +++ /dev/null @@ -1,1481 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250422065634_Add Approver Type")] - partial class AddApproverType - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลา"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250422065634_Add Approver Type.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250422065634_Add Approver Type.cs deleted file mode 100644 index a3241003..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250422065634_Add Approver Type.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddApproverType : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ApproveType", - table: "LeaveRequestApprovers", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ApproveType", - table: "LeaveRequestApprovers"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423024522_Add Leave Day used.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423024522_Add Leave Day used.Designer.cs deleted file mode 100644 index de8fb69b..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423024522_Add Leave Day used.Designer.cs +++ /dev/null @@ -1,1485 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250423024522_Add Leave Day used")] - partial class AddLeaveDayused - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423024522_Add Leave Day used.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423024522_Add Leave Day used.cs deleted file mode 100644 index 495d5e91..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423024522_Add Leave Day used.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddLeaveDayused : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "LeaveDays", - table: "LeaveBeginnings", - type: "double", - nullable: false, - comment: "จำนวนวันลายกมา", - oldClrType: typeof(double), - oldType: "double", - oldComment: "จำนวนวันลา"); - - migrationBuilder.AddColumn( - name: "LeaveDaysUsed", - table: "LeaveBeginnings", - type: "double", - nullable: false, - defaultValue: 0.0, - comment: "จำนวนวันลาที่ใช้ไป"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LeaveDaysUsed", - table: "LeaveBeginnings"); - - migrationBuilder.AlterColumn( - name: "LeaveDays", - table: "LeaveBeginnings", - type: "double", - nullable: false, - comment: "จำนวนวันลา", - oldClrType: typeof(double), - oldType: "double", - oldComment: "จำนวนวันลายกมา"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423025058_Add Profile Info to LeaveBegining.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423025058_Add Profile Info to LeaveBegining.Designer.cs deleted file mode 100644 index 06eeb93e..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423025058_Add Profile Info to LeaveBegining.Designer.cs +++ /dev/null @@ -1,1494 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250423025058_Add Profile Info to LeaveBegining")] - partial class AddProfileInfotoLeaveBegining - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423025058_Add Profile Info to LeaveBegining.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423025058_Add Profile Info to LeaveBegining.cs deleted file mode 100644 index c3924994..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250423025058_Add Profile Info to LeaveBegining.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddProfileInfotoLeaveBegining : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "FirstName", - table: "LeaveBeginnings", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "LastName", - table: "LeaveBeginnings", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Prefix", - table: "LeaveBeginnings", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "FirstName", - table: "LeaveBeginnings"); - - migrationBuilder.DropColumn( - name: "LastName", - table: "LeaveBeginnings"); - - migrationBuilder.DropColumn( - name: "Prefix", - table: "LeaveBeginnings"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250502131455_Add DnaIKd to LeaveRequest.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250502131455_Add DnaIKd to LeaveRequest.Designer.cs deleted file mode 100644 index 23e19b68..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250502131455_Add DnaIKd to LeaveRequest.Designer.cs +++ /dev/null @@ -1,1509 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250502131455_Add DnaIKd to LeaveRequest")] - partial class AddDnaIKdtoLeaveRequest - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250502131455_Add DnaIKd to LeaveRequest.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250502131455_Add DnaIKd to LeaveRequest.cs deleted file mode 100644 index d5206d49..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250502131455_Add DnaIKd to LeaveRequest.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddDnaIKdtoLeaveRequest : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Child1DnaId", - table: "LeaveRequests", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child2DnaId", - table: "LeaveRequests", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child3DnaId", - table: "LeaveRequests", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child4DnaId", - table: "LeaveRequests", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "LeaveRequests", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Child1DnaId", - table: "LeaveRequests"); - - migrationBuilder.DropColumn( - name: "Child2DnaId", - table: "LeaveRequests"); - - migrationBuilder.DropColumn( - name: "Child3DnaId", - table: "LeaveRequests"); - - migrationBuilder.DropColumn( - name: "Child4DnaId", - table: "LeaveRequests"); - - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "LeaveRequests"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250604025614_Fix Missing.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250604025614_Fix Missing.Designer.cs deleted file mode 100644 index fb7c9474..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250604025614_Fix Missing.Designer.cs +++ /dev/null @@ -1,1518 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250604025614_Fix Missing")] - partial class FixMissing - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250604025614_Fix Missing.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250604025614_Fix Missing.cs deleted file mode 100644 index 981da45a..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250604025614_Fix Missing.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class FixMissing : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Latitude", - table: "AdditionalCheckRequests", - type: "double", - nullable: true); - - migrationBuilder.AddColumn( - name: "Longitude", - table: "AdditionalCheckRequests", - type: "double", - nullable: true); - - migrationBuilder.AddColumn( - name: "POI", - table: "AdditionalCheckRequests", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Latitude", - table: "AdditionalCheckRequests"); - - migrationBuilder.DropColumn( - name: "Longitude", - table: "AdditionalCheckRequests"); - - migrationBuilder.DropColumn( - name: "POI", - table: "AdditionalCheckRequests"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250618063628_Add Dna Id to ProcessTimeStamp.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250618063628_Add Dna Id to ProcessTimeStamp.Designer.cs deleted file mode 100644 index 95cbe479..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250618063628_Add Dna Id to ProcessTimeStamp.Designer.cs +++ /dev/null @@ -1,1533 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250618063628_Add Dna Id to ProcessTimeStamp")] - partial class AddDnaIdtoProcessTimeStamp - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250618063628_Add Dna Id to ProcessTimeStamp.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250618063628_Add Dna Id to ProcessTimeStamp.cs deleted file mode 100644 index 505bf90a..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250618063628_Add Dna Id to ProcessTimeStamp.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddDnaIdtoProcessTimeStamp : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Child1DnaId", - table: "ProcessUserTimeStamps", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child2DnaId", - table: "ProcessUserTimeStamps", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child3DnaId", - table: "ProcessUserTimeStamps", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child4DnaId", - table: "ProcessUserTimeStamps", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "ProcessUserTimeStamps", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Child1DnaId", - table: "ProcessUserTimeStamps"); - - migrationBuilder.DropColumn( - name: "Child2DnaId", - table: "ProcessUserTimeStamps"); - - migrationBuilder.DropColumn( - name: "Child3DnaId", - table: "ProcessUserTimeStamps"); - - migrationBuilder.DropColumn( - name: "Child4DnaId", - table: "ProcessUserTimeStamps"); - - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "ProcessUserTimeStamps"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250620072432_Add Dna Id to Leave Table.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250620072432_Add Dna Id to Leave Table.Designer.cs deleted file mode 100644 index 2dbb1f2e..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250620072432_Add Dna Id to Leave Table.Designer.cs +++ /dev/null @@ -1,1578 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20250620072432_Add Dna Id to Leave Table")] - partial class AddDnaIdtoLeaveTable - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250620072432_Add Dna Id to Leave Table.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250620072432_Add Dna Id to Leave Table.cs deleted file mode 100644 index cb770846..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20250620072432_Add Dna Id to Leave Table.cs +++ /dev/null @@ -1,184 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddDnaIdtoLeaveTable : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Child1DnaId", - table: "UserTimeStamps", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child2DnaId", - table: "UserTimeStamps", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child3DnaId", - table: "UserTimeStamps", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child4DnaId", - table: "UserTimeStamps", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "UserTimeStamps", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child1DnaId", - table: "UserDutyTimes", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child2DnaId", - table: "UserDutyTimes", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child3DnaId", - table: "UserDutyTimes", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child4DnaId", - table: "UserDutyTimes", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "UserDutyTimes", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child1DnaId", - table: "AdditionalCheckRequests", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child2DnaId", - table: "AdditionalCheckRequests", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child3DnaId", - table: "AdditionalCheckRequests", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child4DnaId", - table: "AdditionalCheckRequests", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "AdditionalCheckRequests", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Child1DnaId", - table: "UserTimeStamps"); - - migrationBuilder.DropColumn( - name: "Child2DnaId", - table: "UserTimeStamps"); - - migrationBuilder.DropColumn( - name: "Child3DnaId", - table: "UserTimeStamps"); - - migrationBuilder.DropColumn( - name: "Child4DnaId", - table: "UserTimeStamps"); - - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "UserTimeStamps"); - - migrationBuilder.DropColumn( - name: "Child1DnaId", - table: "UserDutyTimes"); - - migrationBuilder.DropColumn( - name: "Child2DnaId", - table: "UserDutyTimes"); - - migrationBuilder.DropColumn( - name: "Child3DnaId", - table: "UserDutyTimes"); - - migrationBuilder.DropColumn( - name: "Child4DnaId", - table: "UserDutyTimes"); - - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "UserDutyTimes"); - - migrationBuilder.DropColumn( - name: "Child1DnaId", - table: "AdditionalCheckRequests"); - - migrationBuilder.DropColumn( - name: "Child2DnaId", - table: "AdditionalCheckRequests"); - - migrationBuilder.DropColumn( - name: "Child3DnaId", - table: "AdditionalCheckRequests"); - - migrationBuilder.DropColumn( - name: "Child4DnaId", - table: "AdditionalCheckRequests"); - - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "AdditionalCheckRequests"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251204123147_Add Dna Field to LeaveBegging.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251204123147_Add Dna Field to LeaveBegging.Designer.cs deleted file mode 100644 index 024f8d5a..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251204123147_Add Dna Field to LeaveBegging.Designer.cs +++ /dev/null @@ -1,1593 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20251204123147_Add Dna Field to LeaveBegging")] - partial class AddDnaFieldtoLeaveBegging - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251204123147_Add Dna Field to LeaveBegging.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251204123147_Add Dna Field to LeaveBegging.cs deleted file mode 100644 index 184d30d0..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251204123147_Add Dna Field to LeaveBegging.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddDnaFieldtoLeaveBegging : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Child1DnaId", - table: "LeaveBeginnings", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child2DnaId", - table: "LeaveBeginnings", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child3DnaId", - table: "LeaveBeginnings", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "Child4DnaId", - table: "LeaveBeginnings", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "RootDnaId", - table: "LeaveBeginnings", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Child1DnaId", - table: "LeaveBeginnings"); - - migrationBuilder.DropColumn( - name: "Child2DnaId", - table: "LeaveBeginnings"); - - migrationBuilder.DropColumn( - name: "Child3DnaId", - table: "LeaveBeginnings"); - - migrationBuilder.DropColumn( - name: "Child4DnaId", - table: "LeaveBeginnings"); - - migrationBuilder.DropColumn( - name: "RootDnaId", - table: "LeaveBeginnings"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251211080157_update_LeaveRequestApprover_add_PositionSign.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251211080157_update_LeaveRequestApprover_add_PositionSign.Designer.cs deleted file mode 100644 index d62357c4..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251211080157_update_LeaveRequestApprover_add_PositionSign.Designer.cs +++ /dev/null @@ -1,1597 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20251211080157_update_LeaveRequestApprover_add_PositionSign")] - partial class update_LeaveRequestApprover_add_PositionSign - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251211080157_update_LeaveRequestApprover_add_PositionSign.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251211080157_update_LeaveRequestApprover_add_PositionSign.cs deleted file mode 100644 index 80797914..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20251211080157_update_LeaveRequestApprover_add_PositionSign.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class update_LeaveRequestApprover_add_PositionSign : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "PositionSign", - table: "LeaveRequestApprovers", - type: "longtext", - nullable: true, - comment: "ตำแหน่งใต้ลายเช็นต์") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "PositionSign", - table: "LeaveRequestApprovers"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260115140500_add_fields_table_eaveequestpprover.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260115140500_add_fields_table_eaveequestpprover.Designer.cs deleted file mode 100644 index 8a505bde..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260115140500_add_fields_table_eaveequestpprover.Designer.cs +++ /dev/null @@ -1,1612 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20260115140500_add_fields_table_eaveequestpprover")] - partial class add_fields_table_eaveequestpprover - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260115140500_add_fields_table_eaveequestpprover.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260115140500_add_fields_table_eaveequestpprover.cs deleted file mode 100644 index 02aee038..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260115140500_add_fields_table_eaveequestpprover.cs +++ /dev/null @@ -1,54 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class add_fields_table_eaveequestpprover : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "OrganizationName", - table: "LeaveRequestApprovers", - type: "longtext", - nullable: false, - comment: "สังกัด") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "PosExecutiveName", - table: "LeaveRequestApprovers", - type: "longtext", - nullable: false, - comment: "ตำแหน่งทางการบริหาร") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "PositionLevelName", - table: "LeaveRequestApprovers", - type: "longtext", - nullable: false, - comment: "ประเภทระดับตำแหน่ง") - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "OrganizationName", - table: "LeaveRequestApprovers"); - - migrationBuilder.DropColumn( - name: "PosExecutiveName", - table: "LeaveRequestApprovers"); - - migrationBuilder.DropColumn( - name: "PositionLevelName", - table: "LeaveRequestApprovers"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260120032158_Add RMQ Task Control.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260120032158_Add RMQ Task Control.Designer.cs deleted file mode 100644 index a7f4e1fb..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260120032158_Add RMQ Task Control.Designer.cs +++ /dev/null @@ -1,1705 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20260120032158_Add RMQ Task Control")] - partial class AddRMQTaskControl - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.CheckInJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AdditionalData") - .HasColumnType("longtext") - .HasComment("ข้อมูลเพิ่มเติม (JSON)"); - - b.Property("CheckInId") - .HasColumnType("char(36)") - .HasComment("CheckInId สำหรับ Check-Out"); - - b.Property("CheckType") - .HasColumnType("longtext") - .HasComment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.Property("TaskId") - .HasColumnType("char(36)") - .HasComment("Task ID สำหรับติดตามสถานะงาน"); - - b.HasKey("Id"); - - b.ToTable("CheckInJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260120032158_Add RMQ Task Control.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260120032158_Add RMQ Task Control.cs deleted file mode 100644 index f8d2090b..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260120032158_Add RMQ Task Control.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddRMQTaskControl : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "CheckInJobStatuses", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), - CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), - LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - TaskId = table.Column(type: "char(36)", nullable: false, comment: "Task ID สำหรับติดตามสถานะงาน", collation: "ascii_general_ci"), - KeycloakUserId = table.Column(type: "char(36)", nullable: false, comment: "รหัส User ของ Keycloak", collation: "ascii_general_ci"), - CreatedDate = table.Column(type: "datetime(6)", nullable: false, comment: "วันเวลาที่สร้างงาน"), - ProcessingDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันเวลาที่เริ่มประมวลผล"), - CompletedDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันเวลาที่เสร็จสิ้นการประมวลผล"), - Status = table.Column(type: "longtext", nullable: false, comment: "สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED") - .Annotation("MySql:CharSet", "utf8mb4"), - CheckType = table.Column(type: "longtext", nullable: true, comment: "ประเภทการลงเวลา: CHECK_IN, CHECK_OUT") - .Annotation("MySql:CharSet", "utf8mb4"), - CheckInId = table.Column(type: "char(36)", nullable: true, comment: "CheckInId สำหรับ Check-Out", collation: "ascii_general_ci"), - ErrorMessage = table.Column(type: "longtext", nullable: true, comment: "ข้อความแสดงข้อผิดพลาด") - .Annotation("MySql:CharSet", "utf8mb4"), - AdditionalData = table.Column(type: "longtext", nullable: true, comment: "ข้อมูลเพิ่มเติม (JSON)") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_CheckInJobStatuses", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "CheckInJobStatuses"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260205034753_Add LeaveCount to LeaveBeginning.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260205034753_Add LeaveCount to LeaveBeginning.Designer.cs deleted file mode 100644 index acd7320f..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260205034753_Add LeaveCount to LeaveBeginning.Designer.cs +++ /dev/null @@ -1,1709 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20260205034753_Add LeaveCount to LeaveBeginning")] - partial class AddLeaveCounttoLeaveBeginning - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลาสะสม"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.CheckInJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AdditionalData") - .HasColumnType("longtext") - .HasComment("ข้อมูลเพิ่มเติม (JSON)"); - - b.Property("CheckInId") - .HasColumnType("char(36)") - .HasComment("CheckInId สำหรับ Check-Out"); - - b.Property("CheckType") - .HasColumnType("longtext") - .HasComment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.Property("TaskId") - .HasColumnType("char(36)") - .HasComment("Task ID สำหรับติดตามสถานะงาน"); - - b.HasKey("Id"); - - b.ToTable("CheckInJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260205034753_Add LeaveCount to LeaveBeginning.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260205034753_Add LeaveCount to LeaveBeginning.cs deleted file mode 100644 index 35fecaea..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260205034753_Add LeaveCount to LeaveBeginning.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddLeaveCounttoLeaveBeginning : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "LeaveCount", - table: "LeaveBeginnings", - type: "int", - nullable: false, - defaultValue: 0, - comment: "จำนวนครั้งที่ลาสะสม"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LeaveCount", - table: "LeaveBeginnings"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260210091134_Add BeginningLeave and LeaveCount to LeaveBeginning.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260210091134_Add BeginningLeave and LeaveCount to LeaveBeginning.Designer.cs deleted file mode 100644 index 934ba1a9..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260210091134_Add BeginningLeave and LeaveCount to LeaveBeginning.Designer.cs +++ /dev/null @@ -1,1717 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20260210091134_Add BeginningLeave and LeaveCount to LeaveBeginning")] - partial class AddBeginningLeaveandLeaveCounttoLeaveBeginning - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BeginningLeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลายกมา"); - - b.Property("BeginningLeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลาสะสม"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลาทั้งหมด"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.CheckInJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AdditionalData") - .HasColumnType("longtext") - .HasComment("ข้อมูลเพิ่มเติม (JSON)"); - - b.Property("CheckInId") - .HasColumnType("char(36)") - .HasComment("CheckInId สำหรับ Check-Out"); - - b.Property("CheckType") - .HasColumnType("longtext") - .HasComment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.Property("TaskId") - .HasColumnType("char(36)") - .HasComment("Task ID สำหรับติดตามสถานะงาน"); - - b.HasKey("Id"); - - b.ToTable("CheckInJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260210091134_Add BeginningLeave and LeaveCount to LeaveBeginning.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260210091134_Add BeginningLeave and LeaveCount to LeaveBeginning.cs deleted file mode 100644 index a54ad519..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260210091134_Add BeginningLeave and LeaveCount to LeaveBeginning.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddBeginningLeaveandLeaveCounttoLeaveBeginning : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "LeaveDays", - table: "LeaveBeginnings", - type: "double", - nullable: false, - comment: "จำนวนวันลาทั้งหมด", - oldClrType: typeof(double), - oldType: "double", - oldComment: "จำนวนวันลายกมา"); - - migrationBuilder.AddColumn( - name: "BeginningLeaveCount", - table: "LeaveBeginnings", - type: "int", - nullable: false, - defaultValue: 0, - comment: "จำนวนครั้งที่ลายกมา"); - - migrationBuilder.AddColumn( - name: "BeginningLeaveDays", - table: "LeaveBeginnings", - type: "double", - nullable: false, - defaultValue: 0.0, - comment: "จำนวนวันลายกมา"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "BeginningLeaveCount", - table: "LeaveBeginnings"); - - migrationBuilder.DropColumn( - name: "BeginningLeaveDays", - table: "LeaveBeginnings"); - - migrationBuilder.AlterColumn( - name: "LeaveDays", - table: "LeaveBeginnings", - type: "double", - nullable: false, - comment: "จำนวนวันลายกมา", - oldClrType: typeof(double), - oldType: "double", - oldComment: "จำนวนวันลาทั้งหมด"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260330020909_Add Leave Process Job Status.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260330020909_Add Leave Process Job Status.Designer.cs deleted file mode 100644 index 815f8188..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260330020909_Add Leave Process Job Status.Designer.cs +++ /dev/null @@ -1,1802 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20260330020909_Add Leave Process Job Status")] - partial class AddLeaveProcessJobStatus - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BeginningLeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลายกมา"); - - b.Property("BeginningLeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลาสะสม"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลาทั้งหมด"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.CheckInJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AdditionalData") - .HasColumnType("longtext") - .HasComment("ข้อมูลเพิ่มเติม (JSON)"); - - b.Property("CheckInId") - .HasColumnType("char(36)") - .HasComment("CheckInId สำหรับ Check-Out"); - - b.Property("CheckType") - .HasColumnType("longtext") - .HasComment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.Property("TaskId") - .HasColumnType("char(36)") - .HasComment("Task ID สำหรับติดตามสถานะงาน"); - - b.HasKey("Id"); - - b.ToTable("CheckInJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.LeaveProcessJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุด"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("รหัส Root DNA Id"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้น"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.HasKey("Id"); - - b.ToTable("LeaveProcessJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260330020909_Add Leave Process Job Status.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260330020909_Add Leave Process Job Status.cs deleted file mode 100644 index 1567dc5e..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260330020909_Add Leave Process Job Status.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddLeaveProcessJobStatus : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "LeaveProcessJobStatuses", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, comment: "PrimaryKey", collation: "ascii_general_ci"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false, comment: "สร้างข้อมูลเมื่อ"), - CreatedUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdatedAt = table.Column(type: "datetime(6)", nullable: true, comment: "แก้ไขข้อมูลล่าสุดเมื่อ"), - LastUpdateUserId = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "User Id ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่สร้างข้อมูล") - .Annotation("MySql:CharSet", "utf8mb4"), - LastUpdateFullName = table.Column(type: "varchar(200)", maxLength: 200, nullable: false, comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด") - .Annotation("MySql:CharSet", "utf8mb4"), - StartDate = table.Column(type: "datetime(6)", nullable: false, comment: "วันเริ่มต้น"), - EndDate = table.Column(type: "datetime(6)", nullable: false, comment: "วันสิ้นสุด"), - RootDnaId = table.Column(type: "char(36)", nullable: false, comment: "รหัส Root DNA Id", collation: "ascii_general_ci"), - CreatedDate = table.Column(type: "datetime(6)", nullable: false, comment: "วันเวลาที่สร้างงาน"), - ProcessingDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันเวลาที่เริ่มประมวลผล"), - CompletedDate = table.Column(type: "datetime(6)", nullable: true, comment: "วันเวลาที่เสร็จสิ้นการประมวลผล"), - Status = table.Column(type: "longtext", nullable: false, comment: "สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED") - .Annotation("MySql:CharSet", "utf8mb4"), - ErrorMessage = table.Column(type: "longtext", nullable: true, comment: "ข้อความแสดงข้อผิดพลาด") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_LeaveProcessJobStatuses", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "LeaveProcessJobStatuses"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260423083625_Add DateSendLeave.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260423083625_Add DateSendLeave.Designer.cs deleted file mode 100644 index 8e79c20b..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260423083625_Add DateSendLeave.Designer.cs +++ /dev/null @@ -1,1805 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20260423083625_Add DateSendLeave")] - partial class AddDateSendLeave - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BeginningLeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลายกมา"); - - b.Property("BeginningLeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลาสะสม"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลาทั้งหมด"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateSendLeave") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.CheckInJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AdditionalData") - .HasColumnType("longtext") - .HasComment("ข้อมูลเพิ่มเติม (JSON)"); - - b.Property("CheckInId") - .HasColumnType("char(36)") - .HasComment("CheckInId สำหรับ Check-Out"); - - b.Property("CheckType") - .HasColumnType("longtext") - .HasComment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.Property("TaskId") - .HasColumnType("char(36)") - .HasComment("Task ID สำหรับติดตามสถานะงาน"); - - b.HasKey("Id"); - - b.ToTable("CheckInJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.LeaveProcessJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุด"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("รหัส Root DNA Id"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้น"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.HasKey("Id"); - - b.ToTable("LeaveProcessJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260423083625_Add DateSendLeave.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260423083625_Add DateSendLeave.cs deleted file mode 100644 index 02d58933..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260423083625_Add DateSendLeave.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddDateSendLeave : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "DateSendLeave", - table: "LeaveRequests", - type: "datetime(6)", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "DateSendLeave", - table: "LeaveRequests"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.Designer.cs deleted file mode 100644 index f95eab33..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.Designer.cs +++ /dev/null @@ -1,1805 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20260505035145_Change Field")] - partial class ChangeField - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BeginningLeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลายกมา"); - - b.Property("BeginningLeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลาสะสม"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลาทั้งหมด"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateSendLeave") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.CheckInJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AdditionalData") - .HasColumnType("longtext") - .HasComment("ข้อมูลเพิ่มเติม (JSON)"); - - b.Property("CheckInId") - .HasColumnType("char(36)") - .HasComment("CheckInId สำหรับ Check-Out"); - - b.Property("CheckType") - .HasColumnType("longtext") - .HasComment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.Property("TaskId") - .HasColumnType("char(36)") - .HasComment("Task ID สำหรับติดตามสถานะงาน"); - - b.HasKey("Id"); - - b.ToTable("CheckInJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.LeaveProcessJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุด"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("รหัส Root DNA Id"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้น"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.HasKey("Id"); - - b.ToTable("LeaveProcessJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.cs deleted file mode 100644 index a6ffb9e4..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class ChangeField : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "LeaveDaysUsed", - table: "LeaveBeginnings", - type: "double", - nullable: true, - comment: "จำนวนวันลาที่ใช้ไป", - oldClrType: typeof(double), - oldType: "double", - oldComment: "จำนวนวันลาที่ใช้ไป"); - - migrationBuilder.AlterColumn( - name: "LeaveCount", - table: "LeaveBeginnings", - type: "int", - nullable: true, - comment: "จำนวนครั้งที่ลาสะสม", - oldClrType: typeof(int), - oldType: "int", - oldComment: "จำนวนครั้งที่ลาสะสม"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "LeaveDaysUsed", - table: "LeaveBeginnings", - type: "double", - nullable: false, - defaultValue: 0.0, - comment: "จำนวนวันลาที่ใช้ไป", - oldClrType: typeof(double), - oldType: "double", - oldNullable: true, - oldComment: "จำนวนวันลาที่ใช้ไป"); - - migrationBuilder.AlterColumn( - name: "LeaveCount", - table: "LeaveBeginnings", - type: "int", - nullable: false, - defaultValue: 0, - comment: "จำนวนครั้งที่ลาสะสม", - oldClrType: typeof(int), - oldType: "int", - oldNullable: true, - oldComment: "จำนวนครั้งที่ลาสะสม"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.Designer.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.Designer.cs deleted file mode 100644 index 165b8195..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.Designer.cs +++ /dev/null @@ -1,1812 +0,0 @@ -// -using System; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - [DbContext(typeof(LeaveDbContext))] - [Migration("20260511075931_Add Approver Field")] - partial class AddApproverField - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("Detail") - .IsRequired() - .HasColumnType("text"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("FileType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ObjectRefId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("Document"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Code") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รหัสประเภทการลา"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Limit") - .HasColumnType("int") - .HasComment("จำนวนวันลาสูงสุดประจำปี"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อประเภทการลา"); - - b.HasKey("Id"); - - b.ToTable("LeaveTypes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("BeginningLeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลายกมา"); - - b.Property("BeginningLeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลาสะสม"); - - b.Property("LeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลาทั้งหมด"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); - - b.Property("LeaveTypeId") - .HasColumnType("char(36)") - .HasComment("รหัสประเภทการลา"); - - b.Property("LeaveYear") - .HasColumnType("int") - .HasComment("ปีงบประมาณ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("LeaveTypeId"); - - b.ToTable("LeaveBeginnings"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DocumentId") - .HasColumnType("char(36)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DocumentId"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveDocuments"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AbsentDayAt") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayGetIn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayLocation") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("AbsentDayRegistorDate") - .HasColumnType("datetime(6)"); - - b.Property("AbsentDaySummon") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Amount") - .HasColumnType("double"); - - b.Property("ApproveStep") - .HasColumnType("longtext") - .HasComment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ "); - - b.Property("BirthDate") - .HasColumnType("datetime(6)"); - - b.Property("CancelLeaveWrote") - .HasColumnType("longtext") - .HasComment("เขียนที่ (ขอยกเลิก)"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CommanderPosition") - .HasColumnType("longtext"); - - b.Property("CoupleDayCountryHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayEndDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDayLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayLevelCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayPosition") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CoupleDayStartDateHistory") - .HasColumnType("datetime(6)"); - - b.Property("CoupleDaySumTotalHistory") - .HasColumnType("longtext"); - - b.Property("CoupleDayTotalHistory") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DateAppoint") - .HasColumnType("datetime(6)"); - - b.Property("DateSendLeave") - .HasColumnType("datetime(6)"); - - b.Property("Dear") - .HasColumnType("longtext") - .HasComment("เรียนใคร"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("HajjDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveAddress") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานที่ติดต่อขณะลา"); - - b.Property("LeaveBirthDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveCancelComment") - .HasColumnType("longtext") - .HasComment("เหตุผลในการขอยกเลิก"); - - b.Property("LeaveCancelDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveCancelStatus") - .HasColumnType("longtext") - .HasComment("สถานะของคำขอยกเลิก"); - - b.Property("LeaveComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้บังคับบัญชา"); - - b.Property("LeaveDetail") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รายละเอียดการลา"); - - b.Property("LeaveDirectorComment") - .HasColumnType("longtext") - .HasComment("ความเห็นของผู้อำนวยการสำนัก"); - - b.Property("LeaveDraftDocumentId") - .HasColumnType("char(36)"); - - b.Property("LeaveEndDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีสิ้นสุดลา"); - - b.Property("LeaveGovernmentDate") - .HasColumnType("datetime(6)"); - - b.Property("LeaveLast") - .HasColumnType("datetime(6)"); - - b.Property("LeaveNumber") - .IsRequired() - .HasColumnType("longtext") - .HasComment("หมายเลขที่ติดต่อขณะลา"); - - b.Property("LeaveRange") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveSalary") - .HasColumnType("int"); - - b.Property("LeaveSalaryText") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LeaveStartDate") - .HasColumnType("datetime(6)") - .HasComment("วัน เดือน ปีเริ่มต้นลา"); - - b.Property("LeaveStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะของคำร้อง"); - - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - - b.Property("LeaveTotal") - .HasColumnType("double"); - - b.Property("LeaveTypeCode") - .HasColumnType("longtext") - .HasComment("code ของประเภทการลา"); - - b.Property("LeaveWrote") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เขียนที่"); - - b.Property("OrdainDayBuddhistLentAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayBuddhistLentName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationAddress") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayLocationNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrdainDayOrdination") - .HasColumnType("datetime(6)"); - - b.Property("OrdainDayStatus") - .HasColumnType("tinyint(1)"); - - b.Property("OrganizationName") - .HasColumnType("longtext") - .HasComment("สังกัดผู้ยื่นขอ"); - - b.Property("PositionLevelName") - .HasColumnType("longtext") - .HasComment("ระดับผู้ยื่นขอ"); - - b.Property("PositionName") - .HasColumnType("longtext") - .HasComment("ตำแหน่งผู้ยื่นขอ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("RestDayCurrentTotal") - .HasColumnType("double"); - - b.Property("RestDayOldTotal") - .HasColumnType("double"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.Property("StudyDayCountry") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayDegreeLevel") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayScholarship") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDaySubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayTrainingSubject") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StudyDayUniversityName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("TypeId") - .HasColumnType("char(36)"); - - b.Property("WifeDayDateBorn") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("WifeDayName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("LeaveCancelDocumentId"); - - b.HasIndex("LeaveDraftDocumentId"); - - b.HasIndex("TypeId"); - - b.ToTable("LeaveRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsAct") - .HasColumnType("tinyint(1)"); - - b.Property("KeyId") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckDate") - .HasColumnType("datetime(6)") - .HasComment("*วันที่ลงเวลา"); - - b.Property("CheckInEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงเช้า"); - - b.Property("CheckOutEdit") - .HasColumnType("tinyint(1)") - .HasComment("*ขอลงเวลาช่วงบ่าย"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Comment") - .HasColumnType("longtext") - .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("*หมายเหตุขอลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak ที่ร้องขอ"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะการอนุมัติ"); - - b.HasKey("Id"); - - b.ToTable("AdditionalCheckRequests"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.CheckInJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AdditionalData") - .HasColumnType("longtext") - .HasComment("ข้อมูลเพิ่มเติม (JSON)"); - - b.Property("CheckInId") - .HasColumnType("char(36)") - .HasComment("CheckInId สำหรับ Check-Out"); - - b.Property("CheckType") - .HasColumnType("longtext") - .HasComment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.Property("TaskId") - .HasColumnType("char(36)") - .HasComment("Task ID สำหรับติดตามสถานะงาน"); - - b.HasKey("Id"); - - b.ToTable("CheckInJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext") - .HasComment("คำอธิบาย"); - - b.Property("EndTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงบ่าย"); - - b.Property("EndTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาออกงานช่วงเช้า"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasComment("สถานะการเปิดใช้งาน (เปิด/ปิด)"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasComment("สถานะว่ารอบใดเป็นค่า Default ของข้าราชการ (สำหรับทุกคนที่ยังไม่ได้ทำการเลือกรอบ)"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("StartTimeAfternoon") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงบ่าย"); - - b.Property("StartTimeMorning") - .IsRequired() - .HasColumnType("longtext") - .HasComment("เวลาเข้างานช่วงเช้า"); - - b.HasKey("Id"); - - b.ToTable("DutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.LeaveProcessJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุด"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("รหัส Root DNA Id"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้น"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.HasKey("Id"); - - b.ToTable("LeaveProcessJobStatuses"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckInStatus") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะ Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("CheckOutStatus") - .HasColumnType("longtext") - .HasComment("สถานะ Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EditReason") - .HasColumnType("longtext") - .HasComment("เหตุผลการอนุมัติ/ไม่อนุมัติขอลงเวลาพิเศษ"); - - b.Property("EditStatus") - .HasColumnType("longtext") - .HasComment("สถานะการของลงเวลาพิเศษ"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("ProcessUserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Calendar") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ปฏิทินการทำงานของ ขรก ปกติ หรือ 6 วันต่อสัปดาห์"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.HasKey("Id"); - - b.ToTable("UserCalendars"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("DutyTimeId") - .HasColumnType("char(36)") - .HasComment("รหัสรอบการลงเวลา"); - - b.Property("EffectiveDate") - .HasColumnType("datetime(6)") - .HasComment("วันที่มีผล"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("ทำการประมวลผลแล้วหรือยัง"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProfileId") - .HasColumnType("char(36)") - .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - - b.Property("Remark") - .HasColumnType("longtext") - .HasComment("หมายเหตุ"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("DutyTimeId"); - - b.ToTable("UserDutyTimes"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CheckIn") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา เข้างาน"); - - b.Property("CheckInImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-In"); - - b.Property("CheckInLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-In"); - - b.Property("CheckInLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-In"); - - b.Property("CheckInLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-In"); - - b.Property("CheckInPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-In"); - - b.Property("CheckInRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-In"); - - b.Property("CheckOut") - .HasColumnType("datetime(6)") - .HasComment("วัน เวลา ออกงาน"); - - b.Property("CheckOutImageUrl") - .IsRequired() - .HasColumnType("longtext") - .HasComment("รูปถ่ายสถานที่ Check-Out"); - - b.Property("CheckOutLat") - .HasColumnType("double") - .HasComment("พิกัดละติจูด Check-Out"); - - b.Property("CheckOutLocationName") - .HasColumnType("longtext") - .HasComment("กรณีเลือกนอกสถานที่ตั้ง ต้องระบุข้อมูลชื่อสถานะที่ Check-Out"); - - b.Property("CheckOutLon") - .HasColumnType("double") - .HasComment("พิกัดลองจิจูด Check-Out"); - - b.Property("CheckOutPOI") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ชื่อสถานที่ ได้มาจากระบบ ArcGis ของกองสารสนเทศภูมิศาสตร์ Check-Out"); - - b.Property("CheckOutRemark") - .HasColumnType("longtext") - .HasComment("ข้อความหมายเหตุที่ต้องการระบุเพิ่ม(มีเผื่อไว้อาจไม่ได้ใช้) Check-Out"); - - b.Property("Child1") - .HasColumnType("longtext"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child1Id") - .HasColumnType("char(36)"); - - b.Property("Child2") - .HasColumnType("longtext"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2Id") - .HasColumnType("char(36)"); - - b.Property("Child3") - .HasColumnType("longtext"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3Id") - .HasColumnType("char(36)"); - - b.Property("Child4") - .HasColumnType("longtext"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4Id") - .HasColumnType("char(36)"); - - b.Property("CitizenId") - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("Gender") - .HasColumnType("longtext"); - - b.Property("IsLocationCheckIn") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-In"); - - b.Property("IsLocationCheckOut") - .HasColumnType("tinyint(1)") - .HasComment("true คือ ณ สถานที่ตั้ง, false คือ นอกสถานที่ตั้ง Check-Out"); - - b.Property("IsProcess") - .HasColumnType("tinyint(1)") - .HasComment("นำไปประมวลผลแล้วหรือยัง"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastName") - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("Prefix") - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("ProfileType") - .HasColumnType("longtext"); - - b.Property("Root") - .HasColumnType("longtext"); - - b.Property("RootDnaId") - .HasColumnType("char(36)"); - - b.Property("RootId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("UserTimeStamps"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "LeaveType") - .WithMany() - .HasForeignKey("LeaveTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveType"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "Document") - .WithMany() - .HasForeignKey("DocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("LeaveDocument") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Document"); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveCancelDocument") - .WithMany() - .HasForeignKey("LeaveCancelDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "LeaveDraftDocument") - .WithMany() - .HasForeignKey("LeaveDraftDocumentId"); - - b.HasOne("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", "Type") - .WithMany() - .HasForeignKey("TypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveCancelDocument"); - - b.Navigation("LeaveDraftDocument"); - - b.Navigation("Type"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") - .WithMany() - .HasForeignKey("DutyTimeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DutyTime"); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => - { - b.Navigation("Approvers"); - - b.Navigation("LeaveDocument"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.cs deleted file mode 100644 index 83d313b0..00000000 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace BMA.EHR.Infrastructure.Migrations.LeaveDb -{ - /// - public partial class AddApproverField : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "IsAct", - table: "LeaveRequestApprovers", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "KeyId", - table: "LeaveRequestApprovers", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "IsAct", - table: "LeaveRequestApprovers"); - - migrationBuilder.DropColumn( - name: "KeyId", - table: "LeaveRequestApprovers"); - } - } -} diff --git a/BMA.EHR.Infrastructure/Migrations/LeaveDb/LeaveDbContextModelSnapshot.cs b/BMA.EHR.Infrastructure/Migrations/LeaveDb/LeaveDbContextModelSnapshot.cs index 929783f7..3ed10221 100644 --- a/BMA.EHR.Infrastructure/Migrations/LeaveDb/LeaveDbContextModelSnapshot.cs +++ b/BMA.EHR.Infrastructure/Migrations/LeaveDb/LeaveDbContextModelSnapshot.cs @@ -50,7 +50,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.HasKey("Id"); - b.ToTable("Document", (string)null); + b.ToTable("Document"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Commons.LeaveType", b => @@ -116,7 +116,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.HasKey("Id"); - b.ToTable("LeaveTypes", (string)null); + b.ToTable("LeaveTypes"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => @@ -128,26 +128,6 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasComment("PrimaryKey") .HasAnnotation("Relational:JsonPropertyName", "id"); - b.Property("BeginningLeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลายกมา"); - - b.Property("BeginningLeaveDays") - .HasColumnType("double") - .HasComment("จำนวนวันลายกมา"); - - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - b.Property("CreatedAt") .HasColumnType("datetime(6)") .HasColumnOrder(100) @@ -167,12 +147,6 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasColumnOrder(101) .HasComment("User Id ที่สร้างข้อมูล"); - b.Property("FirstName") - .HasColumnType("longtext"); - - b.Property("LastName") - .HasColumnType("longtext"); - b.Property("LastUpdateFullName") .IsRequired() .HasMaxLength(200) @@ -192,17 +166,9 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasColumnOrder(102) .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - b.Property("LeaveCount") - .HasColumnType("int") - .HasComment("จำนวนครั้งที่ลาสะสม"); - b.Property("LeaveDays") .HasColumnType("double") - .HasComment("จำนวนวันลาทั้งหมด"); - - b.Property("LeaveDaysUsed") - .HasColumnType("double") - .HasComment("จำนวนวันลาที่ใช้ไป"); + .HasComment("จำนวนวันลา"); b.Property("LeaveTypeId") .HasColumnType("char(36)") @@ -212,21 +178,15 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasColumnType("int") .HasComment("ปีงบประมาณ"); - b.Property("Prefix") - .HasColumnType("longtext"); - b.Property("ProfileId") .HasColumnType("char(36)") .HasComment("รหัส Profile ในระบบทะเบียนประวัติ"); - b.Property("RootDnaId") - .HasColumnType("char(36)"); - b.HasKey("Id"); b.HasIndex("LeaveTypeId"); - b.ToTable("LeaveBeginnings", (string)null); + b.ToTable("LeaveBeginnings"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveDocument", b => @@ -288,7 +248,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.HasIndex("LeaveRequestId"); - b.ToTable("LeaveDocuments", (string)null); + b.ToTable("LeaveDocuments"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => @@ -336,45 +296,30 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.Property("Child1") .HasColumnType("longtext"); - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - b.Property("Child1Id") .HasColumnType("char(36)"); b.Property("Child2") .HasColumnType("longtext"); - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - b.Property("Child2Id") .HasColumnType("char(36)"); b.Property("Child3") .HasColumnType("longtext"); - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - b.Property("Child3Id") .HasColumnType("char(36)"); b.Property("Child4") .HasColumnType("longtext"); - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - b.Property("Child4Id") .HasColumnType("char(36)"); b.Property("CitizenId") .HasColumnType("longtext"); - b.Property("CommanderPosition") - .HasColumnType("longtext"); - b.Property("CoupleDayCountryHistory") .HasColumnType("longtext"); @@ -428,9 +373,6 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.Property("DateAppoint") .HasColumnType("datetime(6)"); - b.Property("DateSendLeave") - .HasColumnType("datetime(6)"); - b.Property("Dear") .HasColumnType("longtext") .HasComment("เรียนใคร"); @@ -521,11 +463,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.Property("LeaveRange") .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); - - b.Property("LeaveRangeEnd") - .HasColumnType("longtext") - .HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); + .HasComment("ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย"); b.Property("LeaveSalary") .HasColumnType("int"); @@ -543,9 +481,6 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasColumnType("longtext") .HasComment("สถานะของคำร้อง"); - b.Property("LeaveSubTypeName") - .HasColumnType("longtext"); - b.Property("LeaveTotal") .HasColumnType("double"); @@ -614,9 +549,6 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.Property("Root") .HasColumnType("longtext"); - b.Property("RootDnaId") - .HasColumnType("char(36)"); - b.Property("RootId") .HasColumnType("char(36)"); @@ -667,126 +599,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.HasIndex("TypeId"); - b.ToTable("LeaveRequests", (string)null); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("ApproveStatus") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ApproveType") - .HasColumnType("longtext"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsAct") - .HasColumnType("tinyint(1)"); - - b.Property("KeyId") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("KeycloakId") - .HasColumnType("char(36)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("LeaveRequestId") - .HasColumnType("char(36)"); - - b.Property("OrganizationName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สังกัด"); - - b.Property("PosExecutiveName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ตำแหน่งทางการบริหาร"); - - b.Property("PositionLevelName") - .IsRequired() - .HasColumnType("longtext") - .HasComment("ประเภทระดับตำแหน่ง"); - - b.Property("PositionName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PositionSign") - .HasColumnType("longtext") - .HasComment("ตำแหน่งใต้ลายเช็นต์"); - - b.Property("Prefix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProfileId") - .HasColumnType("char(36)"); - - b.Property("Seq") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("LeaveRequestId"); - - b.ToTable("LeaveRequestApprovers", (string)null); + b.ToTable("LeaveRequests"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.AdditionalCheckRequest", b => @@ -810,18 +623,6 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasColumnType("tinyint(1)") .HasComment("*ขอลงเวลาช่วงบ่าย"); - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - b.Property("Comment") .HasColumnType("longtext") .HasComment("หมายเหตุในการการอนุมัติ/ไม่อนุมัติ"); @@ -879,21 +680,9 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasColumnOrder(102) .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - b.Property("Latitude") - .HasColumnType("double"); - - b.Property("Longitude") - .HasColumnType("double"); - - b.Property("POI") - .HasColumnType("longtext"); - b.Property("Prefix") .HasColumnType("longtext"); - b.Property("RootDnaId") - .HasColumnType("char(36)"); - b.Property("Status") .IsRequired() .HasColumnType("longtext") @@ -901,100 +690,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.HasKey("Id"); - b.ToTable("AdditionalCheckRequests", (string)null); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.CheckInJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("AdditionalData") - .HasColumnType("longtext") - .HasComment("ข้อมูลเพิ่มเติม (JSON)"); - - b.Property("CheckInId") - .HasColumnType("char(36)") - .HasComment("CheckInId สำหรับ Check-Out"); - - b.Property("CheckType") - .HasColumnType("longtext") - .HasComment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("KeycloakUserId") - .HasColumnType("char(36)") - .HasComment("รหัส User ของ Keycloak"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.Property("TaskId") - .HasColumnType("char(36)") - .HasComment("Task ID สำหรับติดตามสถานะงาน"); - - b.HasKey("Id"); - - b.ToTable("CheckInJobStatuses", (string)null); + b.ToTable("AdditionalCheckRequests"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", b => @@ -1079,92 +775,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.HasKey("Id"); - b.ToTable("DutyTimes", (string)null); - }); - - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.LeaveProcessJobStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasColumnOrder(0) - .HasComment("PrimaryKey") - .HasAnnotation("Relational:JsonPropertyName", "id"); - - b.Property("CompletedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เสร็จสิ้นการประมวลผล"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(100) - .HasComment("สร้างข้อมูลเมื่อ"); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่สร้างงาน"); - - b.Property("CreatedFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(104) - .HasComment("ชื่อ User ที่สร้างข้อมูล"); - - b.Property("CreatedUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(101) - .HasComment("User Id ที่สร้างข้อมูล"); - - b.Property("EndDate") - .HasColumnType("datetime(6)") - .HasComment("วันสิ้นสุด"); - - b.Property("ErrorMessage") - .HasColumnType("longtext") - .HasComment("ข้อความแสดงข้อผิดพลาด"); - - b.Property("LastUpdateFullName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)") - .HasColumnOrder(105) - .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdateUserId") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnOrder(103) - .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด"); - - b.Property("LastUpdatedAt") - .HasColumnType("datetime(6)") - .HasColumnOrder(102) - .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ"); - - b.Property("ProcessingDate") - .HasColumnType("datetime(6)") - .HasComment("วันเวลาที่เริ่มประมวลผล"); - - b.Property("RootDnaId") - .HasColumnType("char(36)") - .HasComment("รหัส Root DNA Id"); - - b.Property("StartDate") - .HasColumnType("datetime(6)") - .HasComment("วันเริ่มต้น"); - - b.Property("Status") - .IsRequired() - .HasColumnType("longtext") - .HasComment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED"); - - b.HasKey("Id"); - - b.ToTable("LeaveProcessJobStatuses", (string)null); + b.ToTable("DutyTimes"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.ProcessUserTimeStamp", b => @@ -1248,36 +859,24 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.Property("Child1") .HasColumnType("longtext"); - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - b.Property("Child1Id") .HasColumnType("char(36)"); b.Property("Child2") .HasColumnType("longtext"); - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - b.Property("Child2Id") .HasColumnType("char(36)"); b.Property("Child3") .HasColumnType("longtext"); - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - b.Property("Child3Id") .HasColumnType("char(36)"); b.Property("Child4") .HasColumnType("longtext"); - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - b.Property("Child4Id") .HasColumnType("char(36)"); @@ -1367,15 +966,12 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.Property("Root") .HasColumnType("longtext"); - b.Property("RootDnaId") - .HasColumnType("char(36)"); - b.Property("RootId") .HasColumnType("char(36)"); b.HasKey("Id"); - b.ToTable("ProcessUserTimeStamps", (string)null); + b.ToTable("ProcessUserTimeStamps"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserCalendar", b => @@ -1436,7 +1032,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.HasKey("Id"); - b.ToTable("UserCalendars", (string)null); + b.ToTable("UserCalendars"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => @@ -1448,18 +1044,6 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasComment("PrimaryKey") .HasAnnotation("Relational:JsonPropertyName", "id"); - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - b.Property("CreatedAt") .HasColumnType("datetime(6)") .HasColumnOrder(100) @@ -1518,14 +1102,11 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb .HasColumnType("longtext") .HasComment("หมายเหตุ"); - b.Property("RootDnaId") - .HasColumnType("char(36)"); - b.HasKey("Id"); b.HasIndex("DutyTimeId"); - b.ToTable("UserDutyTimes", (string)null); + b.ToTable("UserDutyTimes"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserTimeStamp", b => @@ -1600,36 +1181,24 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.Property("Child1") .HasColumnType("longtext"); - b.Property("Child1DnaId") - .HasColumnType("char(36)"); - b.Property("Child1Id") .HasColumnType("char(36)"); b.Property("Child2") .HasColumnType("longtext"); - b.Property("Child2DnaId") - .HasColumnType("char(36)"); - b.Property("Child2Id") .HasColumnType("char(36)"); b.Property("Child3") .HasColumnType("longtext"); - b.Property("Child3DnaId") - .HasColumnType("char(36)"); - b.Property("Child3Id") .HasColumnType("char(36)"); b.Property("Child4") .HasColumnType("longtext"); - b.Property("Child4DnaId") - .HasColumnType("char(36)"); - b.Property("Child4Id") .HasColumnType("char(36)"); @@ -1711,15 +1280,12 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.Property("Root") .HasColumnType("longtext"); - b.Property("RootDnaId") - .HasColumnType("char(36)"); - b.Property("RootId") .HasColumnType("char(36)"); b.HasKey("Id"); - b.ToTable("UserTimeStamps", (string)null); + b.ToTable("UserTimeStamps"); }); modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveBeginning", b => @@ -1775,17 +1341,6 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb b.Navigation("Type"); }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequestApprover", b => - { - b.HasOne("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", "LeaveRequest") - .WithMany("Approvers") - .HasForeignKey("LeaveRequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LeaveRequest"); - }); - modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.TimeAttendants.UserDutyTime", b => { b.HasOne("BMA.EHR.Domain.Models.Leave.TimeAttendants.DutyTime", "DutyTime") @@ -1799,8 +1354,6 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb modelBuilder.Entity("BMA.EHR.Domain.Models.Leave.Requests.LeaveRequest", b => { - b.Navigation("Approvers"); - b.Navigation("LeaveDocument"); }); #pragma warning restore 612, 618 diff --git a/BMA.EHR.Infrastructure/Persistence/ApplicationDBContext.cs b/BMA.EHR.Infrastructure/Persistence/ApplicationDBContext.cs index 6c7c18e2..b6e1fb75 100644 --- a/BMA.EHR.Infrastructure/Persistence/ApplicationDBContext.cs +++ b/BMA.EHR.Infrastructure/Persistence/ApplicationDBContext.cs @@ -321,7 +321,6 @@ namespace BMA.EHR.Infrastructure.Persistence public DbSet InsigniaNoteDocs { get; set; } public DbSet InsigniaManageOrganiations { get; set; } public DbSet InsigniaManageProfiles { get; set; } - public DbSet InsigniaReclaimProfiles { get; set; } #endregion @@ -334,10 +333,6 @@ namespace BMA.EHR.Infrastructure.Persistence public DbSet RetirementDeceaseds { get; set; } public DbSet RetirementDeceasedNotis { get; set; } public DbSet RetirementResigns { get; set; } - public DbSet RetirementResignApprovers { get; set; } - public DbSet RetirementResignCancelApprovers { get; set; } - public DbSet RetirementResignEmployeeApprovers { get; set; } - public DbSet RetirementResignEmployeeCancelApprovers { get; set; } public DbSet RetirementResignCancels { get; set; } public DbSet RetirementResignDocs { get; set; } public DbSet RetirementResignDebtDocs { get; set; } @@ -350,7 +345,6 @@ namespace BMA.EHR.Infrastructure.Persistence public DbSet RetirementExpulsions { get; set; } public DbSet RetirementOthers { get; set; } public DbSet RetirementOtherDocs { get; set; } - public DbSet RetirementEmployeeQuestions { get; set; } public DbSet RetirementQuestions { get; set; } public DbSet RetirementQuestionnaireQuestions { get; set; } diff --git a/BMA.EHR.Infrastructure/Persistence/LeaveDbContext.cs b/BMA.EHR.Infrastructure/Persistence/LeaveDbContext.cs index 10064197..1b2dcbdf 100644 --- a/BMA.EHR.Infrastructure/Persistence/LeaveDbContext.cs +++ b/BMA.EHR.Infrastructure/Persistence/LeaveDbContext.cs @@ -22,8 +22,6 @@ namespace BMA.EHR.Infrastructure.Persistence public DbSet UserCalendars { get; set; } - public DbSet CheckInJobStatuses { get; set; } - #endregion #region " Leave System " @@ -36,12 +34,8 @@ namespace BMA.EHR.Infrastructure.Persistence public DbSet LeaveBeginnings { get; set; } - public DbSet LeaveRequestApprovers { get; set; } - #endregion - public DbSet LeaveProcessJobStatuses { get; set; } - public LeaveDbContext(DbContextOptions options) : base(options) { diff --git a/BMA.EHR.Insignia/BMA.EHR.Insignia.csproj b/BMA.EHR.Insignia/BMA.EHR.Insignia.csproj index 275b4d20..3c761786 100644 --- a/BMA.EHR.Insignia/BMA.EHR.Insignia.csproj +++ b/BMA.EHR.Insignia/BMA.EHR.Insignia.csproj @@ -1,57 +1,53 @@ - + - - net7.0 - enable - enable - 93677512-b64b-4a19-9e7d-dd283c7ec901 - Linux - True - . - BMA.EHR.Insignia.Service - BMA.EHR.Insignia - false - $(NoWarn);$(WarningsNotAsErrors) + + net7.0 + enable + enable + 93677512-b64b-4a19-9e7d-dd283c7ec901 + Linux + True + . + BMA.EHR.Insignia.Service + BMA.EHR.Insignia + - + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - + + + + + + PreserveNewest + + diff --git a/BMA.EHR.Insignia/Configuration/WebSocketConfiguration.cs b/BMA.EHR.Insignia/Configuration/WebSocketConfiguration.cs deleted file mode 100644 index 71ad08af..00000000 --- a/BMA.EHR.Insignia/Configuration/WebSocketConfiguration.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace BMA.EHR.Insignia.Service.Configuration -{ - public class WebSocketConfiguration - { - public const string SectionName = "WebSocket"; - - public string Url { get; set; } = "https://bma-ehr.frappet.synology.me"; - public string Path { get; set; } = "/api/v1/org-socket"; - public string DefaultUserId { get; set; } = "4064c2b2-0414-464a-97c6-4a47c325b9a3"; - public int ReconnectionDelay { get; set; } = 1000; - public int ReconnectionAttempts { get; set; } = 5; - public int Timeout { get; set; } = 20000; - public bool AutoReconnect { get; set; } = true; - public int TaskDelayOnError { get; set; } = 5000; - } -} \ No newline at end of file diff --git a/BMA.EHR.Insignia/Controllers/InsigniaManageController.cs b/BMA.EHR.Insignia/Controllers/InsigniaManageController.cs index 6c0b809f..22ea2484 100644 --- a/BMA.EHR.Insignia/Controllers/InsigniaManageController.cs +++ b/BMA.EHR.Insignia/Controllers/InsigniaManageController.cs @@ -1,14 +1,10 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; using BMA.EHR.Application.Requests; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Models.Insignias; -using BMA.EHR.Domain.Models.MetaData; using BMA.EHR.Domain.Shared; using BMA.EHR.Infrastructure.Persistence; -using BMA.EHR.Insignia.Service.Requests; -using Elasticsearch.Net; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; @@ -330,10 +326,7 @@ namespace BMA.EHR.Insignia.Service.Controllers var total = insigniaManage.InsigniaManageOrganiations.Where(x => x.OrganizationId != req.OrganizationOrganizationId).Sum(x => x.Total); if (req.Total + total > insigniaManage.Total) return Error(GlobalMessages.InsigniaManageOrgLimit); - - var ocData = _userProfileRepository.GetOcByNodeId(req.OrganizationOrganizationId, 0, AccessToken); - var root = ocData?.Root ?? null; - var rootDnaId = ocData?.RootDnaId ?? null; + var root = _userProfileRepository.GetOc(req.OrganizationOrganizationId, 0, AccessToken)?.Root ?? null; await _context.InsigniaManageOrganiations.AddAsync( new InsigniaManageOrganiation { @@ -347,7 +340,6 @@ namespace BMA.EHR.Insignia.Service.Controllers LastUpdateFullName = FullName ?? "System Administrator", LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, - RootDnaId = rootDnaId }); await _context.SaveChangesAsync(); @@ -407,10 +399,6 @@ namespace BMA.EHR.Insignia.Service.Controllers if (uppdated == null) return Error(GlobalMessages.InsigniaManageNotFound); - var ocData = _userProfileRepository.GetOcByNodeId(uppdated.OrganizationId, 0, AccessToken); - var root = ocData?.Root ?? null; - var rootDnaId = ocData?.RootDnaId ?? null; - var insigniaManage = await _context.InsigniaManages.AsQueryable() .Include(x => x.InsigniaManageOrganiations) .FirstOrDefaultAsync(x => x.Id == uppdated.InsigniaManage.Id); @@ -420,9 +408,6 @@ namespace BMA.EHR.Insignia.Service.Controllers if (req.Total + total > insigniaManage.Total) return Error(GlobalMessages.InsigniaManageOrgLimit); - uppdated.Organization = root; - uppdated.RootDnaId = rootDnaId; - uppdated.Total = req.Total; uppdated.LastUpdateFullName = FullName ?? "System Administrator"; uppdated.LastUpdateUserId = UserId ?? ""; @@ -472,325 +457,6 @@ namespace BMA.EHR.Insignia.Service.Controllers return Success(insigniaManage); } - #region " เรียกคืน " - - /// - /// เรียกคืนเครื่องราชฯ - /// - /// Request Body - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("reclaim")] - public async Task> PostReclaimInsignia([FromBody] InsigniaReclaimRequest req) - { - var getPermission = await _permission.GetPermissionAPIAsync("CREATE", "SYS_INSIGNIA_RECLAIM"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var insigniaNoteProfile = await _context.InsigniaNoteProfiles.AsQueryable() - .Include(x => x.RequestInsignia) - .Include(x => x.InsigniaNote) - //.Include(x => x.Profile) - .FirstOrDefaultAsync(x => x.Id == req.InsigniaNoteProfileId); - if (insigniaNoteProfile == null) - return Error(GlobalMessages.InsigniaRequestProfileNotFound); - if (insigniaNoteProfile.Status != "DONE") - return Error(GlobalMessages.InsigniaNoReclaim); - - await _context.InsigniaReclaimProfiles.AddAsync( - new InsigniaReclaimProfile - { - ReclaimDate = req.ReclaimDate, - ReclaimOrganizationId = insigniaNoteProfile.RootId, - ReclaimOrganization = insigniaNoteProfile.Root, - ReclaimReason = req.ReclaimNote, - InsigniaNoteProfile = insigniaNoteProfile, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }); - - await _context.SaveChangesAsync(); - - return Success(); - } - - /// - /// แก้ไขรายการเรียกคืนเครื่องราชฯ - /// - /// - /// Request Body - /// Id เรียกคืนเครื่องราชฯ - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("reclaim/{insigniaReclaimProfileId:guid}")] - public async Task> PutReclaimInsignia([FromBody] UpdateInsigniaReclaimRequest req, Guid insigniaReclaimProfileId) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_INSIGNIA_RECLAIM"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var uppdated = await _context.InsigniaReclaimProfiles.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == insigniaReclaimProfileId); - if (uppdated == null) - return Error(GlobalMessages.InsigniaReclaimNotFound); - - uppdated.ReclaimDate = req.ReclaimDate; - uppdated.ReclaimReason = req.ReclaimNote; - uppdated.LastUpdateFullName = FullName ?? "System Administrator"; - uppdated.LastUpdateUserId = UserId ?? ""; - uppdated.LastUpdatedAt = DateTime.Now; - - await _context.SaveChangesAsync(); - - return Success(); - } - - /// - /// ลบเรียกคืนเครื่องราชฯ - /// - /// - /// Id เรียกคืนเครื่องราชฯ - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("reclaim/{insigniaReclaimProfileId:guid}")] - public async Task> DeleteReclaimInsignia(Guid insigniaReclaimProfileId) - { - var getPermission = await _permission.GetPermissionAPIAsync("DELETE", "SYS_INSIGNIA_RECLAIM"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var deleted = await _context.InsigniaReclaimProfiles.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == insigniaReclaimProfileId); - if (deleted == null) - return Error(GlobalMessages.InsigniaReclaimNotFound); - - _context.InsigniaReclaimProfiles.Remove(deleted); - await _context.SaveChangesAsync(); - return Success(); - } - - /// - /// list รายการเรียกคืนเครื่องราชฯ - /// - /// ปีที่เรียกคืน - /// Id ประเภทเครื่องราชฯ - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("reclaim-list")] - public async Task> ListReclaimInsignia([FromBody] GetReclaimListRequest req) - { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_INSIGNIA_RECLAIM"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - - InsigniaType? insigniaType = null; - if (req.InsigniaTypeId != null) - { - insigniaType = await _context.InsigniaTypes - .FirstOrDefaultAsync(x => x.Id == req.InsigniaTypeId); - if (insigniaType == null) - return Error(GlobalMessages.InsigniaTypeNotFound); - } - - - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; - - var rawData = await _context.InsigniaReclaimProfiles.AsQueryable() - .Include(x => x.InsigniaNoteProfile) - .ThenInclude(x => x.RequestInsignia) - .ThenInclude(x => x.InsigniaType) - //.Where(x => x.InsigniaNoteProfile.RequestInsignia.InsigniaType == insigniaType) - .Where(x => req.Year == 0 ? x.Id != null : x.ReclaimDate!.Value.Year == req.Year) - .OrderByDescending(x => x.CreatedAt) - .Select(p => new - { - Id = p.Id, - ReclaimOrganization = p.ReclaimOrganization, - ReclaimOrganizationId = p.ReclaimOrganizationId, - Profile = p.InsigniaNoteProfile!.ProfileId ?? Guid.Empty, - CitizenId = p.InsigniaNoteProfile!.CitizenId ?? string.Empty, - Prefix = p.InsigniaNoteProfile!.Prefix ?? string.Empty, - FirstName = p.InsigniaNoteProfile!.FirstName ?? string.Empty, - LastName = p.InsigniaNoteProfile!.LastName ?? string.Empty, - ProfileType = p.InsigniaNoteProfile!.ProfileType ?? string.Empty, - Position = p.InsigniaNoteProfile!.Position ?? string.Empty, - ReclaimReason = p.ReclaimReason, - ReclaimDate = p.ReclaimDate, - LastUpdatedAt = p.LastUpdatedAt, - CreatedAt = p.CreatedAt, - InsigniaNoteProfileId = p.InsigniaNoteProfile.Id, - RequestInsignia = p.InsigniaNoteProfile.RequestInsignia == null ? null : p.InsigniaNoteProfile.RequestInsignia.Name, - RequestInsigniaId = p.InsigniaNoteProfile.RequestInsignia == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.InsigniaNoteProfile.RequestInsignia.Id, - RequestInsigniaShortName = p.InsigniaNoteProfile.RequestInsignia == null ? null : p.InsigniaNoteProfile.RequestInsignia.ShortName, - p.InsigniaNoteProfile.DateReceive, - p.InsigniaNoteProfile.OrganizationOrganizationSend, - p.InsigniaNoteProfile.OrganizationOrganizationReceive, - InsigniaNoteProfileStatus = p.InsigniaNoteProfile.Status, - p.InsigniaNoteProfile.Issue, - p.InsigniaNoteProfile.Date, - p.InsigniaNoteProfile.VolumeNo, - p.InsigniaNoteProfile.Section, - p.InsigniaNoteProfile.Page, - p.InsigniaNoteProfile.No, - p.InsigniaNoteProfile.DatePayment, - p.InsigniaNoteProfile.TypePayment, - p.InsigniaNoteProfile.Address, - p.InsigniaNoteProfile.Number, - p.InsigniaNoteProfile.Salary, - - RootDnaId = p.InsigniaNoteProfile.RootDnaId, - Child1DnaId = p.InsigniaNoteProfile.Child1DnaId, - Child2DnaId = p.InsigniaNoteProfile.Child2DnaId, - Child3DnaId = p.InsigniaNoteProfile.Child3DnaId, - Child4DnaId = p.InsigniaNoteProfile.Child4DnaId, - - InsigniaTypeId = p.InsigniaNoteProfile.RequestInsignia.InsigniaType.Id - - }).ToListAsync(); - - if (req.InsigniaTypeId != null) - { - rawData = rawData.Where(x => x.InsigniaTypeId == req.InsigniaTypeId).ToList(); - } - - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - rawData = rawData - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - rawData = rawData - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : true)))).ToList(); - } - else if (role == "ROOT") - { - rawData = rawData - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList(); - } - // else if (role == "PARENT") - // { - // rawData = rawData - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - rawData = rawData.Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : - true - ).ToList(); - } - - var data = rawData - .Select(p => new - { - p.Id, - ReclaimOrganizationId = p.ReclaimOrganizationId, - ReclaimOrganization = p.ReclaimOrganization, - p.ReclaimDate, - p.ReclaimReason, - p.LastUpdatedAt, - p.CreatedAt, - p.InsigniaNoteProfileId, - CitizenId = p.CitizenId, - Prefix = p.Prefix, - Position = p.Position, - FullName = $"{p.Prefix}{p.FirstName} {p.LastName}", - ProfileType = p.ProfileType, - p.RequestInsignia, - p.RequestInsigniaId, - p.RequestInsigniaShortName, - p.DateReceive, - p.OrganizationOrganizationSend, - p.OrganizationOrganizationReceive, - p.InsigniaNoteProfileStatus, - p.Issue, - p.Date, - p.VolumeNo, - p.Section, - p.Page, - p.No, - p.DatePayment, - p.TypePayment, - p.Address, - p.Number, - p.Salary, - - }) - .ToList(); - - return Success(data); - } - - #endregion - /// /// ยืมเครื่องราชฯ /// @@ -825,7 +491,7 @@ namespace BMA.EHR.Insignia.Service.Controllers var insigniaManageOrganiation = await _context.InsigniaManageOrganiations.AsQueryable() .Include(x => x.InsigniaManageProfiles) - .FirstOrDefaultAsync(x => x.RootDnaId == insigniaNoteProfile.RootDnaId && x.InsigniaManage.Id == insigniaManage.Id); // แก้เป็นหาจากหน่วยงานยืมเพิม manage id + .FirstOrDefaultAsync(x => x.OrganizationId == insigniaNoteProfile.RootId && x.InsigniaManage == insigniaManage); if (insigniaManageOrganiation == null) return Error(GlobalMessages.InsigniaManageOrgNotFound); @@ -920,43 +586,6 @@ namespace BMA.EHR.Insignia.Service.Controllers if (insigniaType == null) return Error(GlobalMessages.InsigniaTypeNotFound); - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; - var rawData = await _context.InsigniaManageProfiles.AsQueryable() .Where(x => x.InsigniaNoteProfile.RequestInsignia.InsigniaType == insigniaType) @@ -1003,53 +632,9 @@ namespace BMA.EHR.Insignia.Service.Controllers p.InsigniaNoteProfile.Address, p.InsigniaNoteProfile.Number, p.InsigniaNoteProfile.Salary, - - - RootDnaId = p.InsigniaNoteProfile.RootDnaId, - Child1DnaId = p.InsigniaNoteProfile.Child1DnaId, - Child2DnaId = p.InsigniaNoteProfile.Child2DnaId, - Child3DnaId = p.InsigniaNoteProfile.Child3DnaId, - Child4DnaId = p.InsigniaNoteProfile.Child4DnaId, - }) .ToListAsync(); - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - rawData = rawData - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - rawData = rawData - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : true)))).ToList(); - } - else if (role == "ROOT") - { - rawData = rawData - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList(); - } - // else if (role == "PARENT") - // { - // rawData = rawData - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - rawData = rawData.Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : - true - ).ToList(); - } - var data = rawData .Select(p => new { diff --git a/BMA.EHR.Insignia/Controllers/InsigniaReportController.cs b/BMA.EHR.Insignia/Controllers/InsigniaReportController.cs index 060a711f..3648c4c9 100644 --- a/BMA.EHR.Insignia/Controllers/InsigniaReportController.cs +++ b/BMA.EHR.Insignia/Controllers/InsigniaReportController.cs @@ -10,7 +10,6 @@ using BMA.EHR.Domain.Models.Insignias; using BMA.EHR.Domain.Shared; using BMA.EHR.Infrastructure.Persistence; using BMA.EHR.Insignia.Service.Requests; -using Elasticsearch.Net; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; @@ -99,7 +98,6 @@ namespace BMA.EHR.Insignia.Service.Controllers var data = await _repository.GetCoinReport(req.roundId, type, req.node, req.nodeId); var yearInsignalPeriod = await _repository.GetYearInsigniaPeriod(req.roundId); - var yearLastTwoDigits = yearInsignalPeriod.Substring(yearInsignalPeriod.Length - 2); var dataResult = new List(); var dataList = new List(data); @@ -118,16 +116,6 @@ namespace BMA.EHR.Insignia.Service.Controllers InsigniaName = dataList[i].GetType().GetProperty("InsigniaName").GetValue(dataList[i]), FullName = dataList[i].GetType().GetProperty("FullName").GetValue(dataList[i]), InsigniaInitial = dataList[i].GetType().GetProperty("InsigniaInitial").GetValue(dataList[i]), - Root = dataList[i].GetType().GetProperty("Root").GetValue(dataList[i]), - RootId = dataList[i].GetType().GetProperty("RootId").GetValue(dataList[i]), - Child1 = dataList[i].GetType().GetProperty("Child1").GetValue(dataList[i]), - Child1Id = dataList[i].GetType().GetProperty("Child1Id").GetValue(dataList[i]), - Child2 = dataList[i].GetType().GetProperty("Child2").GetValue(dataList[i]), - Child2Id = dataList[i].GetType().GetProperty("Child2Id").GetValue(dataList[i]), - Child3 = dataList[i].GetType().GetProperty("Child3").GetValue(dataList[i]), - Child3Id = dataList[i].GetType().GetProperty("Child3Id").GetValue(dataList[i]), - Child4 = dataList[i].GetType().GetProperty("Child4").GetValue(dataList[i]), - Child4Id = dataList[i].GetType().GetProperty("Child4Id").GetValue(dataList[i]), Male = gender == "ชาย" ? 1 : 0, Female = gender == "หญิง" ? 1 : 0, }); @@ -156,220 +144,53 @@ namespace BMA.EHR.Insignia.Service.Controllers var stop = 0; var colLeft = 0; var colRight = 0; - var maxRow = Math.Max(left.Count(), right.Count()); - - for (int i = 0; i < maxRow; i++) + for (int i = 0; i < detailList.Count / 2; i++) { - var leftItem = i < left.Count() ? left.ElementAt(i) : null; - var rightItem = i < right.Count() ? right.ElementAt(i) : null; - - // ข้ามถ้าไม่มีข้อมูลทั้งสองฝั่ง - if (leftItem == null && rightItem == null) - continue; - - var insigniaName = leftItem != null - ? leftItem.GetType().GetProperty("InsigniaName").GetValue(leftItem) - : rightItem.GetType().GetProperty("InsigniaName").GetValue(rightItem); - - male = detailList.Count(x => x.Male == 1 && x.InsigniaName == insigniaName); - female = detailList.Count(x => x.Female == 1 && x.InsigniaName == insigniaName); - var countGroup = detailList.Count(x => x.InsigniaName == insigniaName); - var countGroupTemp = detailList.Count(x => x.InsigniaName == insigniaName && x.FullName == ""); - - start = mergeList.Count + 1; - stop = start + (countGroup - countGroupTemp) - 1; - range = (countGroup - countGroupTemp) != 1 ? $"{start} - {stop}" : $"{start}"; + if (InsigniaName != (string)left.ElementAt(i).GetType().GetProperty("InsigniaName").GetValue(left.ElementAt(i))) + { + InsigniaName = (string)left.ElementAt(i).GetType().GetProperty("InsigniaName").GetValue(left.ElementAt(i)); + male = left.Count(x => x.Male == 1 && x.InsigniaName == InsigniaName) + right.Count(x => x.Male == 1 && x.InsigniaName == InsigniaName); + female = left.Count(x => x.Female == 1 && x.InsigniaName == InsigniaName) + right.Count(x => x.Female == 1 && x.InsigniaName == InsigniaName); + var countGroup = detailList.Count(x => x.InsigniaName == InsigniaName); + var countGroupTemp = detailList.Count(x => x.InsigniaName == InsigniaName && x.FullName == ""); + start = i == 0 ? (mergeList.Count + 1) : (stop + 1); + stop = i == 0 ? (mergeList.Count) + (countGroup - countGroupTemp) : (countGroup - countGroupTemp) == 1 ? start : start + (countGroup - countGroupTemp); + range = countGroup - countGroupTemp != 1 ? $"{start} - {stop}" : $"{start}"; + colLeft = start; + colRight = start + 25; + } + // ดึงข้อมูล NameLeft และ NameRight + var nameLeft = left.ElementAt(i).GetType().GetProperty("FullName").GetValue(left.ElementAt(i)); + var nameRight = right.ElementAt(i).GetType().GetProperty("FullName").GetValue(right.ElementAt(i)); + // ถ้าไม่มีทั้ง NameLeft และ NameRight ให้ข้ามไป + if (string.IsNullOrEmpty((string)nameLeft) && string.IsNullOrEmpty((string)nameRight)) + { + continue; // ข้ามการทำงานของลูปในรอบนี้ + } mergeList.Add(new { - ColLeft = colLeft > 0 ? colLeft.ToString().ToThaiNumber() : "", - NameLeft = leftItem?.GetType().GetProperty("FullName").GetValue(leftItem), - RootLeft = leftItem?.GetType().GetProperty("Root").GetValue(leftItem), - Child1Left = leftItem?.GetType().GetProperty("Child1").GetValue(leftItem), - Child2Left = leftItem?.GetType().GetProperty("Child2").GetValue(leftItem), - Child3Left = leftItem?.GetType().GetProperty("Child3").GetValue(leftItem), - Child4Left = leftItem?.GetType().GetProperty("Child4").GetValue(leftItem), - - ColRight = colRight > 0 ? colRight.ToString().ToThaiNumber() : "", - NameRight = rightItem?.GetType().GetProperty("FullName").GetValue(rightItem), - RootRight = rightItem?.GetType().GetProperty("Root").GetValue(rightItem), - Child1Right = rightItem?.GetType().GetProperty("Child1").GetValue(rightItem), - Child2Right = rightItem?.GetType().GetProperty("Child2").GetValue(rightItem), - Child3Right = rightItem?.GetType().GetProperty("Child3").GetValue(rightItem), - Child4Right = rightItem?.GetType().GetProperty("Child4").GetValue(rightItem), - - InsigniaInitial = leftItem?.GetType().GetProperty("InsigniaInitial").GetValue(leftItem) - ?? rightItem?.GetType().GetProperty("InsigniaInitial").GetValue(rightItem), - InsigniaName = insigniaName, + row = mergeList.Count + 1, + ColLeft = colLeft.ToString().ToThaiNumber(), + NameLeft = left.ElementAt(i).GetType().GetProperty("FullName").GetValue(left.ElementAt(i)), + ColRight = colRight.ToString().ToThaiNumber(), + NameRight = right.ElementAt(i).GetType().GetProperty("FullName").GetValue(right.ElementAt(i)), + InsigniaInitial = left.ElementAt(i).GetType().GetProperty("InsigniaInitial").GetValue(left.ElementAt(i)), + InsigniaName = left.ElementAt(i).GetType().GetProperty("InsigniaName").GetValue(left.ElementAt(i)), Range = range.ToThaiNumber(), Male = male.ToString().ToThaiNumber(), - Female = female.ToString().ToThaiNumber() + Female = female.ToString().ToThaiNumber(), }); - } - - dataResult = mergeList; - } - - var groupedByOrg = detailList - .GroupBy(x => - { - string child4Id = x.Child4Id?.ToString() ?? ""; - string child3Id = x.Child3Id?.ToString() ?? ""; - string child2Id = x.Child2Id?.ToString() ?? ""; - string child1Id = x.Child1Id?.ToString() ?? ""; - string rootId = x.RootId?.ToString() ?? ""; - - - if (!string.IsNullOrEmpty(child4Id)) return child4Id; - if (!string.IsNullOrEmpty(child3Id)) return child3Id; - if (!string.IsNullOrEmpty(child2Id)) return child2Id; - if (!string.IsNullOrEmpty(child1Id)) return child1Id; - return rootId; - }) - .Where(g => !string.IsNullOrWhiteSpace(g.Key)) - .Select(orgGroup => - { - var first = orgGroup.FirstOrDefault(); - - var org = !string.IsNullOrWhiteSpace(first?.Child4) ? first.Child4.Trim() : - !string.IsNullOrWhiteSpace(first?.Child3) ? first.Child3.Trim() : - !string.IsNullOrWhiteSpace(first?.Child2) ? first.Child2.Trim() : - !string.IsNullOrWhiteSpace(first?.Child1) ? first.Child1.Trim() : - first.Root.Trim(); - - // Group by InsigniaName - var groupedByInsignia = orgGroup - .GroupBy(x => x.InsigniaName) - .Select(insigniaGroup => - { - if (!insigniaGroup.Any(x => !string.IsNullOrWhiteSpace(x.FullName))) - return null; - - var insigniaName = insigniaGroup.Key; - var left = insigniaGroup.Where(x => x.status == false).ToList(); - var right = insigniaGroup.Where(x => x.status == true).ToList(); - - var male = insigniaGroup.Count(x => x.Male == 1); - var female = insigniaGroup.Count(x => x.Female == 1); - var countGroup = insigniaGroup.Count(); - var countGroupTemp = insigniaGroup.Count(x => x.FullName == ""); - - var start = 1; - var stop = countGroup - countGroupTemp; - var range = stop == 1 ? $"{start}" : $"{start} - {stop}"; - range = range.ToThaiNumber(); - - var people = new List(); - - int colLeft = 1; - int colRight = 26; - int rowCount = Math.Max(left.Count, right.Count); - - var allPeople = left.Concat(right).ToList(); - - int colLeftStart = 1; - int colRightStart = 26; - - for (int i = 0; i < allPeople.Count; i++) - { - var person = allPeople[i]; - - if (string.IsNullOrWhiteSpace(person?.FullName)) - continue; - - if (i < 25) - { - people.Add(new - { - ColLeft = colLeftStart.ToString().ToThaiNumber(), - NameLeft = person.FullName, - RootLeft = person.Root, - Child1Left = person.Child1, - Child2Left = person.Child2, - Child3Left = person.Child3, - Child4Left = person.Child4, - - ColRight = "", - NameRight = "", - RootRight = "", - Child1Right = "", - Child2Right = "", - Child3Right = "", - Child4Right = "", - - InsigniaInitial = person.InsigniaInitial, - InsigniaName = insigniaName, - Range = range, - Male = male.ToString().ToThaiNumber(), - Female = female.ToString().ToThaiNumber() - }); - - colLeftStart++; - } - else - { - // คำนวณแถวที่จะเอาข้อมูลขวาไปใส่ - int indexToUpdate = i - 25; // ถ้า i=25 จะไปแถว 0, i=26 ไปแถว 1 เป็นต้น - - // ดึงแถวที่ต้องการมาแก้ไข - var row = (dynamic)people[indexToUpdate]; - - // สร้าง object ใหม่โดยคัดลอกข้อมูลซ้ายเดิมและเพิ่มข้อมูลขวา - var updatedRow = new - { - ColLeft = row.ColLeft, - NameLeft = row.NameLeft, - RootLeft = row.RootLeft, - Child1Left = row.Child1Left, - Child2Left = row.Child2Left, - Child3Left = row.Child3Left, - Child4Left = row.Child4Left, - - ColRight = colRightStart.ToString().ToThaiNumber(), - NameRight = person.FullName, - RootRight = person.Root, - Child1Right = person.Child1, - Child2Right = person.Child2, - Child3Right = person.Child3, - Child4Right = person.Child4, - - InsigniaInitial = person.InsigniaInitial, - InsigniaName = insigniaName, - Range = range, - Male = male.ToString().ToThaiNumber(), - Female = female.ToString().ToThaiNumber() - }; - - // แทนที่แถวเดิมด้วยแถวที่อัพเดต - people[indexToUpdate] = updatedRow; - - colRightStart++; - } - } - - - - return new - { - name = $"(ชั้นตรา) {insigniaName}", - shotName = left.FirstOrDefault()?.InsigniaInitial ?? right.FirstOrDefault()?.InsigniaInitial, - range = range, - male = male.ToString().ToThaiNumber(), - female = female.ToString().ToThaiNumber(), - people = people - }; - }).ToList(); - - return new + if (mergeList.Count % 25 == 0) { - org = org, - insignia = groupedByInsignia - }; - }) - .Where(x => !string.IsNullOrWhiteSpace(x.org) && x.insignia.Any()) - .ToList(); - - + colLeft = colRight; + colRight = colLeft + 25; + } + colLeft++; + colRight++; + } + dataResult = mergeList; + } var result = new { @@ -378,8 +199,7 @@ namespace BMA.EHR.Insignia.Service.Controllers data = new { yearInsignalPeriod = yearInsignalPeriod, - yearLastTwoDigits = yearLastTwoDigits, - data = groupedByOrg, + data = dataResult, } }; return Success(result); @@ -403,7 +223,6 @@ namespace BMA.EHR.Insignia.Service.Controllers [HttpPost("report2/{type}")] public async Task> GetInsigniaReport2Async([FromBody] GetInsigniaDetailByNodeReportDto req, string type) { - try { var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_INSIGNIA_REPORT"); @@ -413,17 +232,18 @@ namespace BMA.EHR.Insignia.Service.Controllers return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } var yearInsignalPeriod = await _repository.GetYearInsigniaPeriod(req.roundId); + var agency = ""; - var data = await _repository.GetEvaluationResult5YearReport(req.roundId, type, req.node, req.nodeId); + var data = await _repository.GetEvaluationResultReport(req.roundId, type, req.node, req.nodeId); var year = ((DateTime.UtcNow.Year) + 543); - var _agency = data.Count > 0 ? data[0].GetType().GetProperty("Agency").GetValue(data[0]) : null; + var result = new { template = "reportInsignia2", reportName = "reportInsignia2", data = new { - agency = _agency, + agency = agency, yearInsignalPeriod = yearInsignalPeriod, year1 = year.ToString().ToThaiNumber(), year2 = (year - 1).ToString().ToThaiNumber(), @@ -436,7 +256,7 @@ namespace BMA.EHR.Insignia.Service.Controllers return Success(result); } - catch + catch { throw; } @@ -587,6 +407,7 @@ namespace BMA.EHR.Insignia.Service.Controllers } #endregion + #region รายงานสถิติการได้รับเครื่องราชอิสริยาภรณ์ข้าราชการ ฯ /// /// รายงานสถิติการได้รับเครื่องราชอิสริยาภรณ์ข้าราชการ ฯ @@ -687,6 +508,7 @@ namespace BMA.EHR.Insignia.Service.Controllers } #endregion + #region รายงานผลการจ่ายประกาศนียบัตรกำกับเครื่องราชอิสริยาภรณ์ แยกรายหน่วยงาน /// /// รายงานผลการจ่ายประกาศนียบัตรกำกับเครื่องราชอิสริยาภรณ์ แยกรายหน่วยงาน @@ -729,7 +551,7 @@ namespace BMA.EHR.Insignia.Service.Controllers sum = (pending + done).ToString().ToThaiNumber(), }); pendingSum = pendingSum + pending; - doneSum = doneSum + done; + doneSum = pendingSum + done; pending = 0; done = 0; row = 1; @@ -761,7 +583,7 @@ namespace BMA.EHR.Insignia.Service.Controllers sum = (pending + done).ToString().ToThaiNumber(), }); pendingSum = pendingSum + pending; - doneSum = doneSum + done; + doneSum = pendingSum + done; detailList.Add(new { row = "", @@ -831,37 +653,5 @@ namespace BMA.EHR.Insignia.Service.Controllers } #endregion - #region ประวัติสำหรับการเสนอขอพระราชทานเหรียญจักรพรรดิมาลา - /// - /// ประวัติสำหรับการเสนอขอพระราชทานเหรียญจักรพรรดิมาลา - /// - /// id - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("report8/{id}")] - public async Task> GetInsigniaReport8Async(Guid id) - { - - try - { - var data = await _repository.GeInsigniaRequestProfiles(id); - var result = new - { - template = "reportInsignia8", - reportName = "reportInsignia8", - data = data - }; - return Success(result); - - } - catch - { - throw; - } - } - #endregion - } } diff --git a/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs b/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs index 415a0de2..18e9641b 100644 --- a/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs +++ b/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs @@ -4,17 +4,13 @@ using BMA.EHR.Application.Repositories.Reports; using BMA.EHR.Application.Requests; using BMA.EHR.Application.Responses.Insignias; using BMA.EHR.Application.Responses.Organizations; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; +using BMA.EHR.Domain.Models.HR; using BMA.EHR.Domain.Models.Insignias; -using BMA.EHR.Domain.Models.MetaData; -using BMA.EHR.Domain.ModelsExam.Candidate; using BMA.EHR.Domain.Shared; using BMA.EHR.Infrastructure.Persistence; using BMA.EHR.Insignia.Service.Requests; -using BMA.EHR.Insignia.Service.Services; -using Hangfire.Processing; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; @@ -24,7 +20,6 @@ using OfficeOpenXml; using RabbitMQ.Client; using Swashbuckle.AspNetCore.Annotations; using System.Security.Claims; -using System.Security.Cryptography; using System.Text; namespace BMA.EHR.Insignia.Service.Controllers @@ -52,9 +47,6 @@ namespace BMA.EHR.Insignia.Service.Controllers private readonly IConfiguration _configuration; private readonly PermissionRepository _permission; - - private readonly IBackgroundTaskQueue _queue; - /// /// /// @@ -77,8 +69,7 @@ namespace BMA.EHR.Insignia.Service.Controllers InsigniaPeriodsRepository insigniaPeriodRepository, InsigniaReportRepository insigniaReportRepository, IConfiguration configuration, - PermissionRepository permission, - IBackgroundTaskQueue queue) + PermissionRepository permission) { _context = context; _documentService = documentService; @@ -91,8 +82,6 @@ namespace BMA.EHR.Insignia.Service.Controllers _configuration = configuration; _permission = permission; _insigniaReportRepository = insigniaReportRepository; - - _queue = queue; } #region " Properties " @@ -272,11 +261,7 @@ namespace BMA.EHR.Insignia.Service.Controllers requestDoc = "", //irp.DocumentStatus, requestNote = "", // irp.Note, requestSalary = irp.Salary, - matchingConditions = JsonConvert.DeserializeObject>(irp.MatchingConditions), - irp.MarkRate, - irp.MarkLeave, - irp.MarkInsignia, - irp.MarkDiscipline + matchingConditions = JsonConvert.DeserializeObject>(irp.MatchingConditions) }) .OrderBy(x => x.citizenId) .ToList(); @@ -286,14 +271,6 @@ namespace BMA.EHR.Insignia.Service.Controllers #endregion - [HttpGet("test")] - [AllowAnonymous] - public async Task> Test() - { - await _insigniaReportRepository.CalInsigniaRequestBkkByType("employee"); - return Success(); - } - #region " จัดทำรายชื่อครูที่มีสิทธิในการยืนขอเครื่องราชฯ " /// @@ -303,139 +280,13 @@ namespace BMA.EHR.Insignia.Service.Controllers /// Id สังกัด /// ชื่อตำแหน่งระหว่างสกจ กับ เขต (ตอนนี้ให้ส่ง officer ก่อน) /// pending=ผู้ได้รับ, reject=คนไม่ยื่น, delete=คนที่ถูกลบ - /// officer or employee /// /// /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("{insigniaPeriodId:length(36)}/{ocId:length(36)}/{role}/{status}/{isDeputy}/{type}")] - public async Task> GetInsignaiRequestBkkByTypeAsync(Guid insigniaPeriodId, Guid ocId, string role, string status, bool isDeputy, string type = "officer") - { - var result = await _repository.GetInsigniaRequestByTypeAsync(insigniaPeriodId, ocId, type); - if (result != null) - { - Guid period = result.PeriodId; - var periodName = result.Name; - string requestStatus = result.RequestStatus; - string requestNote = result.RequestNote; - - var resend = new InsigniaResults - { - PeriodId = result.PeriodId, - Year = result.Year, - Round = result.Round, - Name = result.Name, - RequestId = result.RequestId, - RequestStatus = result.RequestStatus, - RequestNote = result.RequestNote, - IsLock = result.IsLock, - OrganizationName = result.OrganizationName, - Document = result.Document, - Items = new List() - }; - GetIsOfficerDto RoleInsignia = await _userProfileRepository.GetIsOfficerRootAsync(AccessToken, "SYS_INSIGNIA_MANAGE"); - if (RoleInsignia.isOfficer == true && isDeputy == false && result.RequestStatus != "st6") - return Success(resend); - if (RoleInsignia.isDirector == true && (result.RequestStatus == "st1" || result.RequestStatus == "st2")) - return Success(resend); - - // Jack Remark Remove เพื่อให้เรียกขข้อมูลออกมาเร็สวขึ้น - //var candidate = await _repository.GetInsigniaCandidateBKK(period, ocId); - - //// ตรวจสอบว่ารายการอยู่ใน table insignia_request_new - //if (requestStatus == null) - //{ - // // บันทึกรายชื่อ - // await _repository.InsertCandidate(period, ocId, candidate); - //} - if (role.Trim().ToLower() == "officer") - { - /* resend.Items = (await _repository.InsigniaHasProfile(result.PeriodId, ocId, status, type)) - .Where(x => x.ProfileType!.ToLower() == type.ToLower()).ToList();*/ - var items = await _repository.InsigniaHasProfile(result.PeriodId, ocId, status, type); - - resend.Items = (items ?? new List()) - .Where(x => x != null && !string.IsNullOrEmpty(x.ProfileType) && x.ProfileType.ToLower() == type.ToLower()) - .ToList(); - - return Success(resend); - } - else - { - var passData = _context.InsigniaRequests.AsQueryable() - .Include(x => x.RequestProfiles) - .Where(x => x.OrganizationId == ocId) - .Where(x => x.Period.Id == period) - .Select(ir => new - { - requstID = ir.Id, - requstStatus = ir.RequestStatus, - requstStatusName = GetRequestlStatusText(ir.RequestStatus), - fkInstituteId = -1, - fkInstitute = "", - fkPeriodId = ir.Period.Id, - insigniaRequestHasProfile = FormatRequestProfiles(ir.RequestProfiles.AsQueryable() - .Include(x => x.RequestInsignia) - .ThenInclude(x => x.InsigniaType) - .Where(x => x.IsApprove) - .Where(x => x.ProfileType!.ToLower() == type.ToLower()) - .ToList()) - }) - .ToList() - .FirstOrDefault(); - - var failData = _context.InsigniaRequests.AsQueryable() - .Include(x => x.RequestProfiles) - .Where(x => x.OrganizationId == ocId) - .Where(x => x.Period.Id == period) - .Select(ir => new - { - requstID = ir.Id, - requstStatus = ir.RequestStatus, - requstStatusName = GetRequestlStatusText(ir.RequestStatus), - fkInstituteId = -1, - fkInstitute = "", - fkPeriodId = ir.Period.Id, - insigniaRequestHasProfile = FormatRequestProfiles(ir.RequestProfiles.AsQueryable() - .Include(x => x.RequestInsignia) - .ThenInclude(x => x.InsigniaType) - .Where(x => !x.IsApprove) - .Where(x => x.ProfileType!.ToLower() == type.ToLower()) - .ToList()) - }) - .ToList() - .FirstOrDefault(); - - var period_data = (from p in _context.InsigniaPeriods.AsQueryable() - where p.Id == period - select new - { - periodName = p.Name, - periodYear = p.Year, - }).FirstOrDefault(); - - return Success(new { passData = passData, failData = failData, period = period_data }); - } - } - - return Success(); - } - - /// - /// list รายการคำขอเครื่องราช ผู้ได้รับ,คนไม่ยื่น,คนที่ถูกลบ - /// - /// Id รอบเครื่องราช - /// Id สังกัด - /// ชื่อตำแหน่งระหว่างสกจ กับ เขต (ตอนนี้ให้ส่ง officer ก่อน) - /// pending=ผู้ได้รับ, reject=คนไม่ยื่น, delete=คนที่ถูกลบ - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("{insigniaPeriodId:length(36)}/{ocId:length(36)}/{role}/{status}/{isDeputy}")] - public async Task> GetInsignaiRequestBkk(Guid insigniaPeriodId, Guid ocId, string role, string status, bool isDeputy) + [HttpGet("{insigniaPeriodId:length(36)}/{ocId:length(36)}/{role}/{status}")] + public async Task> GetInsignaiRequestBkk(Guid insigniaPeriodId, Guid ocId, string role, string status) { var result = await _repository.GetInsigniaRequest(insigniaPeriodId, ocId); if (result != null) @@ -460,7 +311,7 @@ namespace BMA.EHR.Insignia.Service.Controllers Items = new List() }; GetIsOfficerDto RoleInsignia = await _userProfileRepository.GetIsOfficerRootAsync(AccessToken, "SYS_INSIGNIA_MANAGE"); - if (RoleInsignia.isOfficer == true && isDeputy == false && result.RequestStatus != "st6") + if (RoleInsignia.isOfficer == true && result.RequestStatus != "st6") return Success(resend); if (RoleInsignia.isDirector == true && (result.RequestStatus == "st1" || result.RequestStatus == "st2")) return Success(resend); @@ -474,7 +325,7 @@ namespace BMA.EHR.Insignia.Service.Controllers // // บันทึกรายชื่อ // await _repository.InsertCandidate(period, ocId, candidate); //} - if (role.Trim().ToLower() == "officer") + if (role.Trim().ToUpper() == "OFFICER") { resend.Items = await _repository.InsigniaHasProfile(result.PeriodId, ocId, status); return Success(resend); @@ -539,63 +390,13 @@ namespace BMA.EHR.Insignia.Service.Controllers } - [HttpGet("cal-test/{periodId:guid}")] - public async Task> GetTestInsigniaRequest(Guid periodId) + [HttpGet("cal-test/{period:guid}/{oc:guid}")] + public async Task> GetTestInsigniaRequest(Guid period, Guid oc) { - //var candidate = await _repository.GetInsigniaCandidateBKK(period, oc); - //await _repository.InsertCandidate(period, oc, "สำนักงานเขตพระนคร", candidate); + var candidate = await _repository.GetInsigniaCandidateBKK(period, oc); + await _repository.InsertCandidate(period, oc, "สำนักงานเขตพระนคร", candidate); - var selectPeriod = _context.InsigniaPeriods.AsNoTracking().Include(x => x.InsigniaEmployees) - .Where(x => x.Id == periodId).FirstOrDefault(); - if (selectPeriod == null) - throw new Exception(GlobalMessages.InsigniaPeriodNotFound); - - var organizations = await _userProfileRepository.GetActiveRootAsync(AccessToken, selectPeriod.RevisionId); - var allEmployeeProfileByRoot = new List(); - - var candidates = new List(); - - foreach (var organization in organizations) - { - if (organization == null) - continue; - - if (selectPeriod != null && selectPeriod.InsigniaEmployees != null) - { - var can = await _repository.GetInsigniaCandidateBKK(periodId, organization.Id); - //var emp = - // await _userProfileRepository.GetEmployeeProfileByPositionAsync(organization.Id, selectPeriod.InsigniaEmployees.Select(x => x.RefId!.ValueOrBlank()).ToArray(), AccessToken); - if (can != null) - candidates.AddRange(can); - } - } - - var resultData = candidates.Where(x => x.ProfileType == "employee").ToList(); - - //var resultData = allEmployeeProfileByRoot.Select(x => new - //{ - // citizenId = x.CitizenId, - // fullName = $"{x.Prefix}{x.FirstName} {x.LastName}", - // root = x.Root, - // child1 = x.Child1 ?? "", - // child2 = x.Child2 ?? "", - // child3 = x.Child3 ?? "", - // child4 = x.Child4 ?? "", - // dateAppoint = x.DateAppoint == null ? "" : x.DateAppoint.Value.ToThaiShortDate(), - // salary = x.Amount, - // salaryCondition = x.ProfileSalary == null || x.ProfileSalary.Count == 0 ? 0 : - // x.ProfileSalary.Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(selectPeriod.Year, 4, 29)) - // .OrderByDescending(x => x.Order).FirstOrDefault() != null ? x.ProfileSalary - // .Where(x => x.Date != null).Where(x => x.Date.Value <= new DateTime(selectPeriod.Year, 4, 29)) - // .OrderByDescending(x => x.Order).FirstOrDefault().Amount : - // x.Amount, - // insignias = x.ProfileInsignia.ToList(), - // salaries = x.ProfileSalary.ToList(), - // profileType = x.ProfileType - //}).ToList(); - - - return Success(resultData); + return Success(candidate); } /// @@ -641,74 +442,6 @@ namespace BMA.EHR.Insignia.Service.Controllers return Success(); } - [HttpGet("bg/{type}/{insigniaPeriodId:length(36)}")] - public async Task> BackgroundCalculateInsigniaRequestByTypeAsync(string type, Guid insigniaPeriodId) - { - await _queue.QueueBackgroundWorkItemAsync(async token => - { - // Logic งาน background จริงเช่น: - //await LongRunningProcess(jobInfo, token); - }); - return Success("Background job started."); - } - - /// - /// คำนวณราชชื่อผู้ได้รับเครื่องราช (แยกตาม officer, employee) - /// - /// officer or employee - /// Id รอบเครื่องราช - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("{type}/{insigniaPeriodId:length(36)}")] - public async Task> CalculateInsigniaRequestByTypeAsync(string type, Guid insigniaPeriodId) - { - try - { - var selectPeriod = _context.InsigniaPeriods.AsNoTracking().Where(x => x.Id == insigniaPeriodId).FirstOrDefault(); - if (selectPeriod == null) - throw new Exception(GlobalMessages.InsigniaPeriodNotFound); - - var organizations = await _userProfileRepository.GetActiveRootAsync(AccessToken, selectPeriod.RevisionId); - - foreach (var organization in organizations) - { - if (organization == null) - continue; - - - var result = await _repository.GetInsigniaRequestByTypeAsync(insigniaPeriodId, organization.Id, type); - if (result != null) - { - Guid period = result.PeriodId; - string requestStatus = result.RequestStatus; - var candidate = await _repository.GetInsigniaCandidateBKKByTypeAsync(insigniaPeriodId, organization.Id, type); - // ตรวจสอบว่ารายการอยู่ใน table insignia_request_new - if (requestStatus == null) - { - // บันทึกรายชื่อ - await _repository.InsertCandidate(period, organization.Id, organization.OrgRootName, candidate, type); - } - else - { - // update รายชื่อ - await _repository.UpdateCandidateAsync(period, organization.Id, organization.OrgRootName, candidate, type); - } - - } - } - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - /// /// คำนวณราชชื่อผู้ได้รับเครื่องราช (Rabbit MQ) /// @@ -782,11 +515,11 @@ namespace BMA.EHR.Insignia.Service.Controllers /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("officer/approve/{type}/{id:length(36)}/{ocId:length(36)}")] - public async Task> ApproveChangeStatusToSt3(Guid id, Guid ocId, string type) + [HttpGet("officer/approve/{id:length(36)}/{ocId:length(36)}")] + public async Task> ApproveChangeStatusToSt3(Guid id, Guid ocId) { - await _repository.SaveApproveByTypeAsync(id, ocId, type); - var requestId = await _repository.GetRequestIdByTypeAsync(id, ocId, type); + await _repository.SaveAprove(id, ocId); + var requestId = await _repository.GetRequestId(id, ocId); var requestNew = await _context.InsigniaRequests .Include(x => x.Period) .FirstOrDefaultAsync(i => i.Id == requestId); @@ -817,11 +550,11 @@ namespace BMA.EHR.Insignia.Service.Controllers /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("officer/reject/{type}/{id:length(36)}/{ocId:length(36)}")] - public async Task> RejectChangeStatusToSt2([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId, string type) + [HttpPut("officer/reject/{id:length(36)}/{ocId:length(36)}")] + public async Task> RejectChangeStatusToSt2([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId) { - await _repository.SaveApproveByTypeAsync(id, ocId, type); - var requestId = await _repository.GetRequestIdByTypeAsync(id, ocId, type); + await _repository.SaveAprove(id, ocId); + var requestId = await _repository.GetRequestId(id, ocId); var requestNew = await _context.InsigniaRequests.FirstOrDefaultAsync(i => i.Id == requestId); if (requestNew != null) { @@ -842,10 +575,10 @@ namespace BMA.EHR.Insignia.Service.Controllers /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("director/approve/{type}/{id:length(36)}/{ocId:length(36)}")] - public async Task> ApproveChangeStatusToSt6(Guid id, Guid ocId, string type) + [HttpGet("director/approve/{id:length(36)}/{ocId:length(36)}")] + public async Task> ApproveChangeStatusToSt6(Guid id, Guid ocId) { - var requestId = await _repository.GetRequestIdByTypeAsync(id, ocId, type); + var requestId = await _repository.GetRequestId(id, ocId); var requestNew = await _context.InsigniaRequests .Include(x => x.Period) .FirstOrDefaultAsync(i => i.Id == requestId); @@ -884,10 +617,10 @@ namespace BMA.EHR.Insignia.Service.Controllers /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("director/reject/{type}/{id:length(36)}/{ocId:length(36)}")] - public async Task> RejectChangeStatusToSt4([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId, string type) + [HttpPut("director/reject/{id:length(36)}/{ocId:length(36)}")] + public async Task> RejectChangeStatusToSt4([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId) { - var requestId = await _repository.GetRequestIdByTypeAsync(id, ocId, type); + var requestId = await _repository.GetRequestId(id, ocId); var requestNew = await _context.InsigniaRequests .Include(x => x.Period) .FirstOrDefaultAsync(i => i.Id == requestId); @@ -918,10 +651,10 @@ namespace BMA.EHR.Insignia.Service.Controllers /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("head/reject/{type}/{id:length(36)}/{ocId:length(36)}")] - public async Task> RejectChangeStatusToSt5([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId, string type) + [HttpPut("head/reject/{id:length(36)}/{ocId:length(36)}")] + public async Task> RejectChangeStatusToSt5([FromBody] InsigniaReasonRequest req, Guid id, Guid ocId) { - var requestId = await _repository.GetRequestIdByTypeAsync(id, ocId, type); + var requestId = await _repository.GetRequestId(id, ocId); var requestNew = await _context.InsigniaRequests .Include(x => x.Period) .FirstOrDefaultAsync(i => i.Id == requestId); @@ -1047,20 +780,18 @@ namespace BMA.EHR.Insignia.Service.Controllers /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("dashboard/{type}/{insigniaPeriodId:length(36)}")] - public async Task> DashboardInsigniaPeriod(Guid insigniaPeriodId, string type) + [HttpGet("dashboard/{insigniaPeriodId:length(36)}")] + public async Task> DashboardInsigniaPeriod(Guid insigniaPeriodId) { var insigniaPeriod = await _context.InsigniaPeriods.FirstOrDefaultAsync(x => x.Id == insigniaPeriodId); if (insigniaPeriod == null) return Error(GlobalMessages.InsigniaRequestNotFound); var orgAllCount = await _context.InsigniaRequests .Where(x => x.Period == insigniaPeriod) - .Where(x => x.ProfileType!.ToLower() == type.ToLower()) .ToListAsync(); GetIsOfficerDto RoleInsignia = await _userProfileRepository.GetIsOfficerRootAsync(AccessToken, "SYS_INSIGNIA_MANAGE"); var allUserUser = await _context.InsigniaRequests .Where(x => x.Period == insigniaPeriod) - .Where(x => x.ProfileType!.ToLower() == type.ToLower()) .Where(x => RoleInsignia.isOfficer == true ? x.RequestStatus == "st6" : (RoleInsignia.isDirector == true ? (x.RequestStatus != "st1" && x.RequestStatus != "st2") : x.Id != null)) .Select(x => x.RequestProfiles.Count(x => x.Status != "DELETE" && x.Status != "REJECT")) .SumAsync(); @@ -1077,8 +808,8 @@ namespace BMA.EHR.Insignia.Service.Controllers /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("org/no-send/{type}/{insigniaPeriodId:length(36)}")] - public async Task> ListOrgDontSentUser(Guid insigniaPeriodId, string type) + [HttpGet("org/no-send/{insigniaPeriodId:length(36)}")] + public async Task> ListOrgDontSentUser(Guid insigniaPeriodId) { var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_INSIGNIA_MANAGE"); var jsonData = JsonConvert.DeserializeObject(getPermission); @@ -1091,7 +822,6 @@ namespace BMA.EHR.Insignia.Service.Controllers return Error(GlobalMessages.InsigniaRequestNotFound); var orgIdSend = await _context.InsigniaRequests .Where(x => x.Period == insigniaPeriod) - .Where(x => x.ProfileType!.ToLower() == type.ToLower()) .Where(x => x.RequestStatus == "st6") .Select(x => x.OrganizationId) .ToListAsync(); @@ -1200,7 +930,7 @@ namespace BMA.EHR.Insignia.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, // Add Information for reused in API Call - ProfileType = profile.ProfileType != null && profile.ProfileType != "" ? profile.ProfileType.ToLower() : "officer", + ProfileType = profile.ProfileType ?? "officer", Prefix = profile.Prefix, FirstName = profile.FirstName, LastName = profile.LastName, @@ -1344,11 +1074,13 @@ namespace BMA.EHR.Insignia.Service.Controllers if (profileOld.ProfileId == null) continue; - var pf = _userProfileRepository.GetOrgProfileByProfileId(profileOld.ProfileId, AccessToken); + var pf = _userProfileRepository.GetOfficerProfileById(profileOld.ProfileId, AccessToken); + if (pf == null) + pf = _userProfileRepository.GetEmployeeProfileById(profileOld.ProfileId, AccessToken); var orgSend = ""; - var orgRecv = ""; - + var orgRecv = ""; + if (profileOld.Child4 != null || profileOld.Child4 != "") orgSend += $"{profileOld.Child4}"; if (profileOld.Child3 != null || profileOld.Child3 != "") @@ -1364,19 +1096,27 @@ namespace BMA.EHR.Insignia.Service.Controllers if (pf != null) { - if (pf.Child4 != null || pf.Child4 != "") - orgRecv += $"{pf.Child4}"; - if (pf.Child3 != null || pf.Child3 != "") - orgRecv += $" {pf.Child3}"; - if (pf.Child2 != null || pf.Child2 != "") - orgRecv += $" {pf.Child2}"; - if (pf.Child1 != null || pf.Child1 != "") - orgRecv += $" {pf.Child1}"; - if (pf.Root != null || pf.Root != "") - orgRecv += $" {pf.Root}"; - orgRecv = orgRecv.Trim(); + var kk = pf.Keycloak == null ? Guid.Empty : pf.Keycloak.Value; + var pfData = await _userProfileRepository.GetProfileByKeycloakIdAsync(kk, AccessToken); + if (pfData != null) + { + if (pfData.Child4 != null || pfData.Child4 != "") + orgRecv += $"{pfData.Child4}"; + if (pfData.Child3 != null || pfData.Child3 != "") + orgRecv += $" {pfData.Child3}"; + if (pfData.Child2 != null || pfData.Child2 != "") + orgRecv += $" {pfData.Child2}"; + if (pfData.Child1 != null || pfData.Child1 != "") + orgRecv += $" {pfData.Child1}"; + if (pfData.Root != null || pfData.Root != "") + orgRecv += $" {pfData.Root}"; + + + orgRecv = orgRecv.Trim(); + } } + await _context.InsigniaNoteProfiles.AddAsync(new InsigniaNoteProfile { RequestDate = profileOld.RequestDate, @@ -1386,10 +1126,10 @@ namespace BMA.EHR.Insignia.Service.Controllers ProfileId = profileOld.ProfileId, RequestInsignia = profileOld.RequestInsignia, - + OrganizationOrganizationSend = orgSend, OrganizationOrganizationReceive = orgRecv, - + InsigniaNote = insigniaNote, CreatedFullName = FullName ?? "System Administrator", CreatedUserId = UserId ?? "", @@ -1503,167 +1243,6 @@ namespace BMA.EHR.Insignia.Service.Controllers return Success(insigniaNotes); } - - /// - /// list รายชื่อบันทึกผลการได้รับพระราชทานเครื่องราชอิสริยสภรณ์/การจ่ายใบกำกับ (แยก officer, employee) - /// - /// Reqest Body - /// officer or employee - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("note/search/{type}")] - public async Task> GetListNoteProfileByTypeAsync([FromBody] InsigniaNoteSearchRequest req, string type = "officer") - { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_INSIGNIA_RECORD"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var insigniaNote = await _context.InsigniaNotes - .FirstOrDefaultAsync(x => x.Id == req.InsigniaNoteId); - if (insigniaNote == null) - return Error(GlobalMessages.InsigniaRequestNotFound); - var insigniaType = await _context.InsigniaTypes - .FirstOrDefaultAsync(x => x.Id == req.InsigniaTypeId); - if (insigniaType == null) - return Error(GlobalMessages.InsigniaTypeNotFound); - - var rawNoteProfiles = await _context.InsigniaNoteProfiles - .Where(x => x.ProfileType!.ToLower() == type.ToLower()) - .Where(x => x.InsigniaNote == insigniaNote) - .Where(x => x.RequestInsignia.InsigniaType == insigniaType) - .Where(x => req.InsigniaId == null ? x.RequestInsignia != null : (x.RequestInsignia.Id == req.InsigniaId)) - .Select(x => new - { - x.ProfileId, - Id = x.Id, - x.Prefix, - x.FirstName, - x.LastName, - x.Position, - x.CitizenId, - x.ProfileType, - OcId = x.RootId, // TODO: ต้องมาแก้ไข - RequestInsignia = x.RequestInsignia.Name, - RequestInsigniaId = x.RequestInsignia.Id, - RequestInsigniaShortName = x.RequestInsignia.ShortName, - DateReceive = x.DateReceive, - x.OrganizationOrganizationSend, - x.OrganizationOrganizationReceive, - Status = x.Status, - Issue = x.Issue, - Date = x.Date, - VolumeNo = x.VolumeNo, - Section = x.Section, - Page = x.Page, - No = x.No, - DatePayment = x.DatePayment, - TypePayment = x.TypePayment, - Address = x.Address, - Number = x.Number, - Salary = x.Salary, - DateReceiveInsignia = x.DateReceiveInsignia, - DocReceiveInsignia = x.DocReceiveInsignia == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.DocReceiveInsignia.Id, - x.OrgReceiveInsignia, - x.OrgReceiveInsigniaId, - DateReturnInsignia = x.DateReturnInsignia, - DocReturnInsignia = x.DocReturnInsignia == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.DocReturnInsignia.Id, - x.OrgReturnInsignia, - x.OrgReturnInsigniaId, - }) - .ToListAsync(); - - var insigniaNoteProfiles = rawNoteProfiles - .Select(x => new - { - Id = x.Id, - ProfileId = x.ProfileId, - Prefix = x.Prefix ?? "", - Position = x.Position ?? "", - ProfileType = x.ProfileType ?? "", - x.OcId, - CitizenId = x.CitizenId ?? "", - FullName = $"{x.Prefix ?? ""}{x.FirstName ?? ""} {x.LastName ?? ""}".Trim(), - RequestInsignia = x.RequestInsignia, - RequestInsigniaId = x.RequestInsigniaId, - RequestInsigniaShortName = x.RequestInsigniaShortName, - DateReceive = x.DateReceive, - x.OrganizationOrganizationSend, - x.OrganizationOrganizationReceive, - Status = x.Status, - Issue = x.Issue, - Date = x.Date, - VolumeNo = x.VolumeNo, - Section = x.Section, - Page = x.Page, - No = x.No, - DatePayment = x.DatePayment, - TypePayment = x.TypePayment, - Address = x.Address, - Number = x.Number, - Salary = x.Salary, - DateReceiveInsignia = x.DateReceiveInsignia, - DocReceiveInsignia = x.DocReceiveInsignia, - x.OrgReceiveInsignia, - x.OrgReceiveInsigniaId, - DateReturnInsignia = x.DateReturnInsignia, - DocReturnInsignia = x.DocReturnInsignia, - x.OrgReturnInsignia, - x.OrgReturnInsigniaId, - }) - .ToList(); - - var _insigniaNoteProfiles = new List(); - foreach (var insigniaNoteProfile in insigniaNoteProfiles) - { - _insigniaNoteProfiles.Add( - new - { - insigniaNoteProfile.Id, - insigniaNoteProfile.ProfileId, - insigniaNoteProfile.Prefix, - insigniaNoteProfile.Position, - insigniaNoteProfile.CitizenId, - insigniaNoteProfile.ProfileType, - insigniaNoteProfile.FullName, - insigniaNoteProfile.RequestInsignia, - insigniaNoteProfile.RequestInsigniaId, - insigniaNoteProfile.RequestInsigniaShortName, - insigniaNoteProfile.DateReceive, - insigniaNoteProfile.OrganizationOrganizationSend, - insigniaNoteProfile.OrganizationOrganizationReceive, - insigniaNoteProfile.Status, - insigniaNoteProfile.Issue, - insigniaNoteProfile.Date, - insigniaNoteProfile.VolumeNo, - insigniaNoteProfile.Section, - insigniaNoteProfile.Page, - insigniaNoteProfile.No, - insigniaNoteProfile.DatePayment, - insigniaNoteProfile.TypePayment, - insigniaNoteProfile.Address, - insigniaNoteProfile.Number, - insigniaNoteProfile.Salary, - insigniaNoteProfile.DateReceiveInsignia, - DocReceiveInsignia = insigniaNoteProfile.DocReceiveInsignia == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(insigniaNoteProfile.DocReceiveInsignia), - insigniaNoteProfile.OrgReceiveInsignia, - insigniaNoteProfile.OrgReceiveInsigniaId, - insigniaNoteProfile.DateReturnInsignia, - DocReturnInsignia = insigniaNoteProfile.DocReturnInsignia == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(insigniaNoteProfile.DocReturnInsignia), - insigniaNoteProfile.OrgReturnInsignia, - insigniaNoteProfile.OrgReturnInsigniaId, - } - ); - } - - return Success(_insigniaNoteProfiles); - } - - /// /// list รายชื่อบันทึกผลการได้รับพระราชทานเครื่องราชอิสริยสภรณ์/การจ่ายใบกำกับ /// @@ -1838,23 +1417,17 @@ namespace BMA.EHR.Insignia.Service.Controllers .FirstOrDefaultAsync(x => x.Id == req.InsigniaNoteId); if (insigniaNote == null) return Error(GlobalMessages.InsigniaRequestNotFound); - - InsigniaType? insigniaType = null; - if (req.InsigniaTypeId != null) - { - insigniaType = await _context.InsigniaTypes - .FirstOrDefaultAsync(x => x.Id == req.InsigniaTypeId); - if (insigniaType == null) - return Error(GlobalMessages.InsigniaTypeNotFound); - } + var insigniaType = await _context.InsigniaTypes + .FirstOrDefaultAsync(x => x.Id == req.InsigniaTypeId); + if (insigniaType == null) + return Error(GlobalMessages.InsigniaTypeNotFound); var rawNoteProfiles = await _context.InsigniaNoteProfiles .Where(x => x.InsigniaNote == insigniaNote) - //.Where(x => x.RequestInsignia.InsigniaType == insigniaType) + .Where(x => x.RequestInsignia.InsigniaType == insigniaType) .Where(x => req.InsigniaId == null ? x.RequestInsignia != null : (x.RequestInsignia.Id == req.InsigniaId)) .Select(x => new { - InsigniaTypeId = x.RequestInsignia.InsigniaType.Id, Id = x.Id, x.CitizenId, x.Prefix, @@ -1892,11 +1465,6 @@ namespace BMA.EHR.Insignia.Service.Controllers }) .ToListAsync(); - if (req.InsigniaTypeId != null) - { - rawNoteProfiles = rawNoteProfiles.Where(x => x.InsigniaTypeId == req.InsigniaTypeId).ToList(); - } - var insigniaNoteProfiles = rawNoteProfiles .Select(x => new { @@ -2091,68 +1659,68 @@ namespace BMA.EHR.Insignia.Service.Controllers if (profileInsignia == null) { - var insigniaNoteProfile = new InsigniaNoteProfile - { - Salary = profile.ProfileSalary == null ? 0 : profile.ProfileSalary.Amount, - IsApprove = true, - Status = "PENDING", - ProfileId = profile.Id, - Issue = req.Issue, - Number = req.Number, - DateReceive = req.DateReceive, - Date = req.Date, - VolumeNo = req.VolumeNo, - Section = req.Section, - Page = req.Page, - No = req.No, - DatePayment = req.DatePayment, - TypePayment = req.TypePayment, - Address = req.Address, - RequestInsignia = insignia, - OrganizationOrganizationReceive = req.OrganizationOrganizationReceive, - OrganizationOrganizationSend = req.OrganizationOrganizationSend, - InsigniaNote = insigniaNote, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, + var insigniaNoteProfile = new InsigniaNoteProfile + { + Salary = profile.ProfileSalary == null ? 0 : profile.ProfileSalary.Amount, + IsApprove = true, + Status = "PENDING", + ProfileId = profile.Id, + Issue = req.Issue, + Number = req.Number, + DateReceive = req.DateReceive, + Date = req.Date, + VolumeNo = req.VolumeNo, + Section = req.Section, + Page = req.Page, + No = req.No, + DatePayment = req.DatePayment, + TypePayment = req.TypePayment, + Address = req.Address, + RequestInsignia = insignia, + OrganizationOrganizationReceive = req.OrganizationOrganizationReceive, + OrganizationOrganizationSend = req.OrganizationOrganizationSend, + InsigniaNote = insigniaNote, + CreatedFullName = FullName ?? "System Administrator", + CreatedUserId = UserId ?? "", + CreatedAt = DateTime.Now, + LastUpdateFullName = FullName ?? "System Administrator", + LastUpdateUserId = UserId ?? "", + LastUpdatedAt = DateTime.Now, - Amount = profile.ProfileSalary == null ? 0 : profile.ProfileSalary.Amount, - CitizenId = profile.CitizenId, - DateAppoint = profile.DateAppoint, - Prefix = profile.Prefix, - FirstName = profile.FirstName, - LastName = profile.LastName, - Gender = profile.Gender, - PosLevelName = profile.PosLevel, - PosNo = profile.PosNo, - PosTypeName = profile.PosType, - Position = profile.Position, - ProfileType = profile.ProfileType, - PositionSalaryAmount = profile.ProfileSalary == null ? 0 : profile.ProfileSalary.PositionSalaryAmount, + Amount = profile.ProfileSalary == null ? 0 : profile.ProfileSalary.Amount, + CitizenId = profile.CitizenId, + DateAppoint = profile.DateAppoint, + Prefix = profile.Prefix, + FirstName = profile.FirstName, + LastName = profile.LastName, + Gender = profile.Gender, + PosLevelName = profile.PosLevel, + PosNo = profile.PosNo, + PosTypeName = profile.PosType, + Position = profile.Position, + ProfileType = profile.ProfileType, + PositionSalaryAmount = profile.ProfileSalary == null ? 0 : profile.ProfileSalary.PositionSalaryAmount, - Root = profile.Root, - RootId = profile.RootId, - RootDnaId = profile.RootDnaId, - Child1 = profile.Child1, - Child1Id = profile.Child1Id, - Child1DnaId = profile.Child1DnaId, - Child2 = profile.Child2, - Child2Id = profile.Child2Id, - Child2DnaId = profile.Child2DnaId, - Child3 = profile.Child3, - Child3Id = profile.Child3Id, - Child3DnaId = profile.Child3DnaId, - Child4 = profile.Child4, - Child4Id = profile.Child4Id, - Child4DnaId = profile.Child4DnaId, + Root = profile.Root, + RootId = profile.RootId, + RootDnaId = profile.RootDnaId, + Child1 = profile.Child1, + Child1Id = profile.Child1Id, + Child1DnaId = profile.Child1DnaId, + Child2 = profile.Child2, + Child2Id = profile.Child2Id, + Child2DnaId = profile.Child2DnaId, + Child3 = profile.Child3, + Child3Id = profile.Child3Id, + Child3DnaId = profile.Child3DnaId, + Child4 = profile.Child4, + Child4Id = profile.Child4Id, + Child4DnaId = profile.Child4DnaId, - }; + }; insigniaNote.InsigniaNoteProfiles.Add(insigniaNoteProfile); @@ -2161,50 +1729,25 @@ namespace BMA.EHR.Insignia.Service.Controllers { insigniaNoteProfile.Status = "DONE"; - if (profile.ProfileType == "officer") + var profileInsigniaBody = new PostProfileInsigniaDto { - var profileInsigniaBody = new PostProfileInsigniaDto - { - profileId = profile.Id, - year = insigniaNote.Year, - no = req.No, - volumeNo = req.VolumeNo, - section = req.Section, - page = req.Page, - receiveDate = req.DateReceive.Value, - dateAnnounce = req.Date.Value, - insigniaId = insignia.Id, - issue = req.Issue, - note = "", - refCommandDate = null, - refCommandNo = "", - volume = "", + profileId = profile.Id, + year = insigniaNote.Year, + no = req.No, + volumeNo = req.VolumeNo, + section = req.Section, + page = req.Page, + receiveDate = req.DateReceive.Value, + dateAnnounce = req.Date.Value, + insigniaId = insignia.Id, + issue = req.Issue, + note = "", + refCommandDate = null, + refCommandNo = "", + volume = "", - }; - await _userProfileRepository.PostProfileInsigniaAsync(profileInsigniaBody, AccessToken); - } - else - { - var profileInsigniaBody = new PostProfileEmpInsigniaDto - { - profileEmployeeId = profile.Id, - year = insigniaNote.Year, - no = req.No, - volumeNo = req.VolumeNo, - section = req.Section, - page = req.Page, - receiveDate = req.DateReceive.Value, - dateAnnounce = req.Date.Value, - insigniaId = insignia.Id, - issue = req.Issue, - note = "", - refCommandDate = null, - refCommandNo = "", - volume = "", - - }; - await _userProfileRepository.PostProfileEmpInsigniaAsync(profileInsigniaBody, AccessToken); - } + }; + await _userProfileRepository.PostProfileInsigniaAsync(profileInsigniaBody, AccessToken); } } else @@ -2229,48 +1772,24 @@ namespace BMA.EHR.Insignia.Service.Controllers if (req.DateReceive != null && req.Date != null) { profileInsignia.Status = "DONE"; - if (profile.ProfileType != null && profile.ProfileType.ToLower() == "officer") + var profileInsigniaBody = new PostProfileInsigniaDto { - var profileInsigniaBody = new PostProfileInsigniaDto - { - profileId = profileInsignia.ProfileId.Value, - year = insigniaNote.Year, - no = profileInsignia.No, - volumeNo = profileInsignia.VolumeNo, - section = profileInsignia.Section, - page = profileInsignia.Page, - receiveDate = profileInsignia.DateReceive.Value, - dateAnnounce = profileInsignia.Date.Value, - insigniaId = profileInsignia.RequestInsignia.Id, - issue = profileInsignia.Issue, - note = "", - refCommandDate = null, - refCommandNo = "", - volume = "", - }; - await _userProfileRepository.PostProfileInsigniaAsync(profileInsigniaBody, AccessToken); - } - else - { - var profileInsigniaBody = new PostProfileEmpInsigniaDto - { - profileEmployeeId = profileInsignia.ProfileId.Value, - year = insigniaNote.Year, - no = profileInsignia.No, - volumeNo = profileInsignia.VolumeNo, - section = profileInsignia.Section, - page = profileInsignia.Page, - receiveDate = profileInsignia.DateReceive.Value, - dateAnnounce = profileInsignia.Date.Value, - insigniaId = profileInsignia.RequestInsignia.Id, - issue = profileInsignia.Issue, - note = "", - refCommandDate = null, - refCommandNo = "", - volume = "", - }; - await _userProfileRepository.PostProfileEmpInsigniaAsync(profileInsigniaBody, AccessToken); - } + profileId = profileInsignia.ProfileId.Value, + year = insigniaNote.Year, + no = profileInsignia.No, + volumeNo = profileInsignia.VolumeNo, + section = profileInsignia.Section, + page = profileInsignia.Page, + receiveDate = profileInsignia.DateReceive.Value, + dateAnnounce = profileInsignia.Date.Value, + insigniaId = profileInsignia.RequestInsignia.Id, + issue = profileInsignia.Issue, + note = "", + refCommandDate = null, + refCommandNo = "", + volume = "", + }; + await _userProfileRepository.PostProfileInsigniaAsync(profileInsigniaBody, AccessToken); } } } @@ -2485,71 +2004,24 @@ namespace BMA.EHR.Insignia.Service.Controllers if (profile.Status != "DONE") { profile.Status = "DONE"; - - // check profile.ProfileType ก่อนส่งไประบบทะเบียนประวัติ - if (profile.ProfileType == "officer") + var profileInsignia = new PostProfileInsigniaDto { - var profileInsigniaBody = new PostProfileInsigniaDto - { - profileId = profile!.ProfileId!.Value, - year = insigniaNote.Year, - no = profile!.No ?? "", - volumeNo = profile!.VolumeNo ?? "", - section = profile!.Section ?? "", - page = profile!.Page ?? "", - receiveDate = profile.DateReceive!.Value, - dateAnnounce = profile.Date!.Value, - insigniaId = profile.RequestInsignia!.Id, - issue = profile!.Issue ?? "", - note = "", - refCommandDate = null, - refCommandNo = "", - volume = profile!.VolumeNo ?? "", - - }; - await _userProfileRepository.PostProfileInsigniaAsync(profileInsigniaBody, AccessToken); - } - else - { - var profileInsigniaBody = new PostProfileEmpInsigniaDto - { - profileEmployeeId = profile!.ProfileId!.Value, - year = insigniaNote.Year, - no = profile!.No ?? "", - volumeNo = profile!.VolumeNo ?? "", - section = profile!.Section ?? "", - page = profile!.Page ?? "", - receiveDate = profile.DateReceive!.Value, - dateAnnounce = profile.Date!.Value, - insigniaId = profile.RequestInsignia!.Id, - issue = profile!.Issue ?? "", - note = "", - refCommandDate = null, - refCommandNo = "", - volume = profile!.VolumeNo ?? "", - - }; - await _userProfileRepository.PostProfileEmpInsigniaAsync(profileInsigniaBody, AccessToken); - } - - //var profileInsignia = new PostProfileInsigniaDto - //{ - // profileId = profile.ProfileId.Value, - // year = insigniaNote.Year, - // no = profile.No, - // volumeNo = profile.VolumeNo, - // section = profile.Section, - // page = profile.Page, - // receiveDate = profile.DateReceive.Value, - // dateAnnounce = profile.Date.Value, - // insigniaId = profile.RequestInsignia.Id, - // issue = "", - // note = "", - // refCommandDate = null, - // refCommandNo = "", - // volume = "", - //}; - //await _userProfileRepository.PostProfileInsigniaAsync(profileInsignia, AccessToken); + profileId = profile.ProfileId.Value, + year = insigniaNote.Year, + no = profile.No, + volumeNo = profile.VolumeNo, + section = profile.Section, + page = profile.Page, + receiveDate = profile.DateReceive.Value, + dateAnnounce = profile.Date.Value, + insigniaId = profile.RequestInsignia.Id, + issue = "", + note = "", + refCommandDate = null, + refCommandNo = "", + volume = "", + }; + await _userProfileRepository.PostProfileInsigniaAsync(profileInsignia, AccessToken); } } await _context.SaveChangesAsync(); @@ -2613,145 +2085,136 @@ namespace BMA.EHR.Insignia.Service.Controllers [HttpPut("preview/receice/{insigniaNoteId:length(36)}"), DisableRequestSizeLimit] public async Task> PreviewReceiceProfile([FromForm] ImportFileRequest req, Guid insigniaNoteId) { - try - { - var getPermission = await _permission.GetPermissionAPIAsync("CREATE", "SYS_INSIGNIA_RECORD"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - var insigniaNote = await _context.InsigniaNotes - .Include(x => x.InsigniaNoteProfiles) - .Include(x => x.InsigniaNoteProfiles) - .ThenInclude(x => x.RequestInsignia) - .ThenInclude(x => x.InsigniaType) - .Include(x => x.InsigniaNoteProfiles) - .Include(x => x.InsigniaNoteProfiles) - .FirstOrDefaultAsync(x => x.Id == insigniaNoteId); - if (insigniaNote == null) - return Error(GlobalMessages.InsigniaRequestNotFound); + var getPermission = await _permission.GetPermissionAPIAsync("CREATE", "SYS_INSIGNIA_RECORD"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); + var insigniaNote = await _context.InsigniaNotes + .Include(x => x.InsigniaNoteProfiles) + .Include(x => x.InsigniaNoteProfiles) + .ThenInclude(x => x.RequestInsignia) + .ThenInclude(x => x.InsigniaType) + .Include(x => x.InsigniaNoteProfiles) + .Include(x => x.InsigniaNoteProfiles) + .FirstOrDefaultAsync(x => x.Id == insigniaNoteId); + if (insigniaNote == null) + return Error(GlobalMessages.InsigniaRequestNotFound); - if (Request.Form.Files == null || Request.Form.Files.Count == 0) - return Error(GlobalMessages.NoFileToUpload); - var file = Request.Form.Files[0]; - if (!Path.GetExtension(file.FileName).Equals(".xlsx", StringComparison.OrdinalIgnoreCase)) - return Error("นามสกุลไฟล์ต้องเป็น .xlsx!"); - var items = await ReadExcelImportReceive(file); - var _insigniaNoteProfiles = new List(); - foreach (var item in items) + if (Request.Form.Files == null || Request.Form.Files.Count == 0) + return Error(GlobalMessages.NoFileToUpload); + var file = Request.Form.Files[0]; + if (!Path.GetExtension(file.FileName).Equals(".xlsx", StringComparison.OrdinalIgnoreCase)) + return Error("นามสกุลไฟล์ต้องเป็น .xlsx!"); + var items = await ReadExcelImportReceive(file); + var _insigniaNoteProfiles = new List(); + foreach (var item in items) + { + if (item.CitizanId == null) continue; + var _profile = await _userProfileRepository.GetOfficerProfileByCitizenId(item.CitizanId, AccessToken); + var profile = insigniaNote.InsigniaNoteProfiles.FirstOrDefault(x => x.ProfileId == _profile.Id); + if (profile == null) { - if (item.CitizanId == null) continue; - var _profile = await _userProfileRepository.GetOfficerProfileByCitizenId(item.CitizanId, AccessToken); if (_profile == null) continue; - var profile = insigniaNote.InsigniaNoteProfiles.FirstOrDefault(x => x.ProfileId == _profile.Id); - if (profile == null) + var _insignia = await _context.Insignias.FirstOrDefaultAsync(x => x.Name == item.RequestInsignia); + if (_insignia == null) + continue; + profile = new InsigniaNoteProfile { - if (_profile == null) - continue; - var _insignia = await _context.Insignias.FirstOrDefaultAsync(x => x.Name == item.RequestInsignia); - if (_insignia == null) - continue; - profile = new InsigniaNoteProfile - { - RequestDate = DateTime.Now, - Salary = _profile.Amount, - IsApprove = true, - Status = "DONE", - Number = item.Number, - RequestInsignia = _insignia, - DateReceive = item.DateReceive, - Date = item.Date, - VolumeNo = item.VolumeNo, - Section = item.Section, - Page = item.Page, - No = item.No, - ProfileId = _profile.Id, - InsigniaNote = insigniaNote, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - Prefix = _profile.Prefix, - Position = _profile.Position, - CitizenId = _profile.CitizenId, - ProfileType = _profile.ProfileType, - FirstName = _profile.FirstName, - LastName = _profile.LastName, - BirthDate = _profile.BirthDate, - DateAppoint = _profile.DateAppoint, - Gender = _profile.Gender, - PosTypeName = _profile.PosType, - PosLevelName = _profile.PosLevel, - PosNo = _profile.PosNo, - Amount = _profile.Amount, - PositionSalaryAmount = _profile.PositionSalaryAmount, - Root = _profile.Root, - RootId = _profile.RootId, - RootDnaId = _profile.RootDnaId, - Child1 = _profile.Child1, - Child1Id = _profile.Child1Id, - Child1DnaId = _profile.Child1DnaId, - Child2 = _profile.Child2, - Child2Id = _profile.Child2Id, - Child2DnaId = _profile.Child2DnaId, - Child3 = _profile.Child3, - Child3Id = _profile.Child3Id, - Child3DnaId = _profile.Child3DnaId, - Child4 = _profile.Child4, - Child4Id = _profile.Child4Id, - Child4DnaId = _profile.Child4DnaId, - }; - } - else - { - profile.Status = "DONE"; - profile.Number = item.Number; - profile.RequestInsignia = await _context.Insignias.FirstOrDefaultAsync(x => x.Name == item.RequestInsignia) == null ? profile.RequestInsignia : await _context.Insignias.FirstOrDefaultAsync(x => x.Name == item.RequestInsignia); - profile.DateReceive = item.DateReceive; - profile.Date = item.Date; - profile.VolumeNo = item.VolumeNo; - profile.Section = item.Section; - profile.Page = item.Page; - profile.No = item.No; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = DateTime.Now; - } - _insigniaNoteProfiles.Add( - new - { - profile.Id, - Prefix = _profile.Prefix, - Position = _profile.Position, - CitizenId = _profile.CitizenId, - ProfileType = _profile.ProfileType, - FullName = $"{_profile.Prefix}{_profile.FirstName} {_profile.LastName}", - RequestInsignia = profile.RequestInsignia == null ? null : profile.RequestInsignia.Name, - RequestInsigniaId = profile.RequestInsignia == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : profile.RequestInsignia.Id, - RequestInsigniaShortName = profile.RequestInsignia == null ? null : profile.RequestInsignia.ShortName, - profile.DateReceive, - profile.OrganizationOrganizationSend, - profile.OrganizationOrganizationReceive, - profile.Status, - profile.Issue, - profile.Date, - profile.VolumeNo, - profile.Section, - profile.Page, - profile.No, - profile.DatePayment, - profile.TypePayment, - profile.Address, - profile.Number, - profile.Salary, - } - ); + RequestDate = DateTime.Now, + Salary = _profile.Amount, + IsApprove = true, + Status = "DONE", + Number = item.Number, + RequestInsignia = _insignia, + DateReceive = item.DateReceive, + Date = item.Date, + VolumeNo = item.VolumeNo, + Section = item.Section, + Page = item.Page, + No = item.No, + ProfileId = _profile.Id, + InsigniaNote = insigniaNote, + LastUpdateFullName = FullName ?? "System Administrator", + LastUpdateUserId = UserId ?? "", + LastUpdatedAt = DateTime.Now, + Prefix = _profile.Prefix, + Position = _profile.Position, + CitizenId = _profile.CitizenId, + ProfileType = _profile.ProfileType, + FirstName = _profile.FirstName, + LastName = _profile.LastName, + BirthDate = _profile.BirthDate, + DateAppoint = _profile.DateAppoint, + Gender = _profile.Gender, + PosTypeName = _profile.PosType, + PosLevelName = _profile.PosLevel, + PosNo = _profile.PosNo, + Amount = _profile.Amount, + PositionSalaryAmount = _profile.PositionSalaryAmount, + Root = _profile.Root, + RootId = _profile.RootId, + RootDnaId = _profile.RootDnaId, + Child1 = _profile.Child1, + Child1Id = _profile.Child1Id, + Child1DnaId = _profile.Child1DnaId, + Child2 = _profile.Child2, + Child2Id = _profile.Child2Id, + Child2DnaId = _profile.Child2DnaId, + Child3 = _profile.Child3, + Child3Id = _profile.Child3Id, + Child3DnaId = _profile.Child3DnaId, + Child4 = _profile.Child4, + Child4Id = _profile.Child4Id, + Child4DnaId = _profile.Child4DnaId, + }; } - return Success(_insigniaNoteProfiles); - } - catch (Exception ex) - { - return Error(ex); + else + { + profile.Status = "DONE"; + profile.Number = item.Number; + profile.RequestInsignia = await _context.Insignias.FirstOrDefaultAsync(x => x.Name == item.RequestInsignia) == null ? profile.RequestInsignia : await _context.Insignias.FirstOrDefaultAsync(x => x.Name == item.RequestInsignia); + profile.DateReceive = item.DateReceive; + profile.Date = item.Date; + profile.VolumeNo = item.VolumeNo; + profile.Section = item.Section; + profile.Page = item.Page; + profile.No = item.No; + profile.LastUpdateFullName = FullName ?? "System Administrator"; + profile.LastUpdateUserId = UserId ?? ""; + profile.LastUpdatedAt = DateTime.Now; + } + _insigniaNoteProfiles.Add( + new + { + profile.Id, + Prefix = _profile.Prefix, + Position = _profile.Position, + CitizenId = _profile.CitizenId, + ProfileType = _profile.ProfileType, + FullName = $"{_profile.Prefix}{_profile.FirstName} {_profile.LastName}", + RequestInsignia = profile.RequestInsignia == null ? null : profile.RequestInsignia.Name, + RequestInsigniaId = profile.RequestInsignia == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : profile.RequestInsignia.Id, + RequestInsigniaShortName = profile.RequestInsignia == null ? null : profile.RequestInsignia.ShortName, + profile.DateReceive, + profile.OrganizationOrganizationSend, + profile.OrganizationOrganizationReceive, + profile.Status, + profile.Issue, + profile.Date, + profile.VolumeNo, + profile.Section, + profile.Page, + profile.No, + profile.DatePayment, + profile.TypePayment, + profile.Address, + profile.Number, + profile.Salary, + } + ); } + return Success(_insigniaNoteProfiles); } /// @@ -2968,10 +2431,7 @@ namespace BMA.EHR.Insignia.Service.Controllers requestProfiles = requestProfiles.Where(x => x.ProfileId != null) .ToList(); if (req.InsigniaId != null) - requestProfiles = requestProfiles - .Where(x => x.ProfileType.ToLower() == req.ProfileType.ToLower()) - .Where(x => x.RequestInsignia.Id == req.InsigniaId) - .ToList(); + requestProfiles = requestProfiles.Where(x => x.RequestInsignia.Id == req.InsigniaId).ToList(); var row = 2; foreach (var item in requestProfiles) { @@ -3098,7 +2558,7 @@ namespace BMA.EHR.Insignia.Service.Controllers var doc = await _documentService.UploadFileAsync(file, file.FileName); insigniaNoteProfile.DocReturnInsignia = doc; } - var root = _userProfileRepository.GetOcByNodeId(req.OrgId, 0, AccessToken)?.Root ?? null; + var root = _userProfileRepository.GetOc(req.OrgId, 0, AccessToken)?.Root ?? null; if (req.OrgId != Guid.Parse("00000000-0000-0000-0000-000000000000")) { if (root == null) @@ -3148,10 +2608,7 @@ namespace BMA.EHR.Insignia.Service.Controllers var doc = await _documentService.UploadFileAsync(file, file.FileName); insigniaNoteProfile.DocReceiveInsignia = doc; } - - var orgData = _userProfileRepository.GetOcByNodeId(req.OrgId,0, AccessToken); - var root = orgData?.Root ?? null; - var rootDnaId = orgData?.RootDnaId ?? null; + var root = _userProfileRepository.GetOc(req.OrgId, 0, AccessToken)?.Root ?? null; if (req.OrgId != Guid.Parse("00000000-0000-0000-0000-000000000000")) { if (root == null) @@ -3162,7 +2619,6 @@ namespace BMA.EHR.Insignia.Service.Controllers root = "สำนักนายกรัฐมนตรี"; } insigniaNoteProfile.OrgReceiveInsignia = root; - insigniaNoteProfile.RootDnaId = rootDnaId; insigniaNoteProfile.OrgReceiveInsigniaId = req.OrgId; insigniaNoteProfile.DateReceiveInsignia = req.Date; insigniaNoteProfile.LastUpdateFullName = FullName ?? "System Administrator"; @@ -3172,47 +2628,5 @@ namespace BMA.EHR.Insignia.Service.Controllers return Success(); } - - /// - /// อัพเดทสถานะ Mark (โทษทางวินัย, ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น (เนื่องจากลาเกิน), ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี, ข้อมูลเครื่องราชฯ) - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("update")] - public async Task> InsigniaRequestUpdateMark([FromBody] UpdateInsigniaRequestProfile req) - { - try - { - var insigniaPeriod = await _context.InsigniaPeriods - .Include(x => x.InsigniaRequests.Where(r => r.OrganizationId == req.agencyId)) - .FirstOrDefaultAsync(x => x.Id == req.insigniaPeriodId); - if (insigniaPeriod == null) - return Error(GlobalMessages.InsigniaRequestNotFound); - - if (insigniaPeriod.InsigniaRequests.Count > 0) - { - - foreach (var InsigniaRequest in insigniaPeriod.InsigniaRequests) - { - var profiles = await _context.Set() - .Where(p => p.Request.Id == InsigniaRequest.Id && p.ProfileType == req.type.Trim().ToLower()).Select(x => x.ProfileId.ToString()).ToListAsync(); - - if (profiles.Count > 0) - { - await _insigniaPeriodRepository.UpdateInsigniaRequestProfile(profiles.ToArray(), req.type.Trim().ToLower()); - } - } - } - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - } } } diff --git a/BMA.EHR.Insignia/Program.cs b/BMA.EHR.Insignia/Program.cs index 88c1c2ac..b83b3d21 100644 --- a/BMA.EHR.Insignia/Program.cs +++ b/BMA.EHR.Insignia/Program.cs @@ -1,11 +1,13 @@ using BMA.EHR.Application; +using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.Reports; using BMA.EHR.Domain.Middlewares; using BMA.EHR.Infrastructure; +using BMA.EHR.Infrastructure.MessageQueue; using BMA.EHR.Infrastructure.Persistence; using BMA.EHR.Insignia.Service; +using BMA.EHR.Insignia.Service.Controllers; using BMA.EHR.Insignia.Service.Filters; -using BMA.EHR.Insignia.Service.Services; using Hangfire; using Hangfire.Common; using Hangfire.MySql; @@ -19,6 +21,7 @@ using Microsoft.IdentityModel.Tokens; using Serilog; using Serilog.Exceptions; using Serilog.Sinks.Elasticsearch; +using System.Reflection; using System.Text; using System.Transactions; @@ -27,6 +30,7 @@ var builder = WebApplication.CreateBuilder(args); var issuer = builder.Configuration["Jwt:Issuer"]; var key = builder.Configuration["Jwt:Key"]; + IdentityModelEventSource.ShowPII = true; builder.Services.AddHttpContextAccessor(); @@ -88,9 +92,6 @@ var builder = WebApplication.CreateBuilder(args); builder.Services.AddLeaveApplication(); builder.Services.AddLeavePersistence(builder.Configuration); - builder.Services.AddSingleton(); - builder.Services.AddHostedService(); - builder.Services.AddControllers(options => @@ -125,14 +126,9 @@ var builder = WebApplication.CreateBuilder(args); DashboardJobListLimit = 50000, TransactionTimeout = TimeSpan.FromMinutes(1), InvisibilityTimeout = TimeSpan.FromHours(3), - TablesPrefix = "Hangfire_Insignia" + TablesPrefix = "Hangfire" }))); - builder.Services.AddHangfireServer(options => - { - options.ServerName = "Insignia-Server"; // ← ระบุชื่อ server - options.WorkerCount = 5; // ← - options.Queues = new[] { "insignia","default" }; // ← worker จะรันเฉพาะ queue "insignia" - }); + builder.Services.AddHangfireServer(); // RabbitMQ @@ -172,14 +168,13 @@ var app = builder.Build(); app.UseHttpsRedirection(); app.UseCors(); - app.UseMiddleware(); app.UseAuthentication(); app.UseAuthorization(); app.UseDefaultFiles(); app.UseStaticFiles(); app.MapControllers(); - // app.UseMiddleware(); - // app.UseMiddleware(); + app.UseMiddleware(); + app.UseMiddleware(); app.UseHangfireDashboard("/hangfire", new DashboardOptions() { Authorization = new[] { new CustomAuthorizeFilter() } @@ -189,34 +184,9 @@ var app = builder.Build(); { manager.AddOrUpdate("แจ้งเตือนรอบเครื่องราชฯ", Job.FromExpression(x => x.NotifyInsignia()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); manager.AddOrUpdate("ล็อกข้อมูลรอบเครื่องราชฯ", Job.FromExpression(x => x.LockInsignia()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); - //manager.AddOrUpdate("คำนวนผู้ได้รับเครื่องราชฯ", () => CalculateInsigniaRequestBkkByType("officer"), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); - //manager.AddOrUpdate("คำนวนผู้ได้รับเครื่องราชฯ Employee", Job.FromExpression(x => x.CalInsigniaRequestBkkByType("employee")), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); + manager.AddOrUpdate("คำนวนผู้ได้รับเครื่องราชฯ", Job.FromExpression(x => x.CalInsignaiRequestBkk()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); } - RecurringJob.AddOrUpdate( - "คำนวนผู้ได้รับเครื่องราชฯ", - x => x.CalculateInsigniaRequestBkkByType("officer"), - Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]) - 5, - Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), - new RecurringJobOptions - { - TimeZone = TimeZoneInfo.Local, - QueueName = "insignia" // ← กำหนด queue - } - ); - - RecurringJob.AddOrUpdate( - "คำนวนผู้ได้รับเครื่องราชฯ Employee", - x => x.CalculateInsigniaRequestBkkByType("employee"), - Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]) - 4, - Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), - new RecurringJobOptions - { - TimeZone = TimeZoneInfo.Local, - QueueName = "insignia" // ← กำหนด queue - } - ); - // apply migrations await using var scope = app.Services.CreateAsyncScope(); await using var db = scope.ServiceProvider.GetRequiredService(); @@ -225,13 +195,9 @@ var app = builder.Build(); //var rabbitMQConsumer = app.Services.GetRequiredService(); //rabbitMQConsumer.StartReceiving(); - - app.Run(); } - - void ConfigureLogs() { var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); diff --git a/BMA.EHR.Insignia/Requests/GetReclaimListRequest.cs b/BMA.EHR.Insignia/Requests/GetReclaimListRequest.cs deleted file mode 100644 index 0ff8e6e6..00000000 --- a/BMA.EHR.Insignia/Requests/GetReclaimListRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace BMA.EHR.Insignia.Service.Requests -{ - public class GetReclaimListRequest - { - public int Year { get; set; } = 0; - - public Guid? InsigniaTypeId { get; set; } - } -} diff --git a/BMA.EHR.Insignia/Requests/InsigniaNoteSearchRequest.cs b/BMA.EHR.Insignia/Requests/InsigniaNoteSearchRequest.cs index f457a70d..fca5c598 100644 --- a/BMA.EHR.Insignia/Requests/InsigniaNoteSearchRequest.cs +++ b/BMA.EHR.Insignia/Requests/InsigniaNoteSearchRequest.cs @@ -5,7 +5,7 @@ namespace BMA.EHR.Insignia.Service.Requests { public class InsigniaNoteSearchRequest { - public Guid? InsigniaTypeId { get; set; } + public Guid InsigniaTypeId { get; set; } public Guid InsigniaNoteId { get; set; } public Guid? InsigniaId { get; set; } } diff --git a/BMA.EHR.Insignia/Requests/UpdateInsigniaRequestProfile.cs b/BMA.EHR.Insignia/Requests/UpdateInsigniaRequestProfile.cs deleted file mode 100644 index 50c79940..00000000 --- a/BMA.EHR.Insignia/Requests/UpdateInsigniaRequestProfile.cs +++ /dev/null @@ -1,12 +0,0 @@ -using BMA.EHR.Domain.Models.MetaData; -using Microsoft.EntityFrameworkCore; - -namespace BMA.EHR.Insignia.Service.Requests -{ - public class UpdateInsigniaRequestProfile - { - public Guid insigniaPeriodId { get; set; } - public Guid agencyId { get; set; } - public string type { get; set; } - } -} \ No newline at end of file diff --git a/BMA.EHR.Insignia/Services/BackgroundTaskQueue.cs b/BMA.EHR.Insignia/Services/BackgroundTaskQueue.cs deleted file mode 100644 index 31805486..00000000 --- a/BMA.EHR.Insignia/Services/BackgroundTaskQueue.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections.Concurrent; - -namespace BMA.EHR.Insignia.Service.Services -{ - public class BackgroundTaskQueue : IBackgroundTaskQueue - { - private readonly ConcurrentQueue> _workItems = new(); - private readonly SemaphoreSlim _signal = new(0); - - public ValueTask QueueBackgroundWorkItemAsync(Func workItem) - { - if (workItem == null) - throw new ArgumentNullException(nameof(workItem)); - _workItems.Enqueue(workItem); - _signal.Release(); - return ValueTask.CompletedTask; - } - - public async ValueTask> DequeueAsync(CancellationToken cancellationToken) - { - await _signal.WaitAsync(cancellationToken); - _workItems.TryDequeue(out var workItem); - return workItem!; - } - } -} diff --git a/BMA.EHR.Insignia/Services/IBackgroundTaskQueue.cs b/BMA.EHR.Insignia/Services/IBackgroundTaskQueue.cs deleted file mode 100644 index 7259a5fb..00000000 --- a/BMA.EHR.Insignia/Services/IBackgroundTaskQueue.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace BMA.EHR.Insignia.Service.Services -{ - public interface IBackgroundTaskQueue - { - ValueTask QueueBackgroundWorkItemAsync(Func workItem); - ValueTask> DequeueAsync(CancellationToken cancellationToken); - } -} diff --git a/BMA.EHR.Insignia/Services/InsigniaRequestProcessService.cs b/BMA.EHR.Insignia/Services/InsigniaRequestProcessService.cs deleted file mode 100644 index ecdbabda..00000000 --- a/BMA.EHR.Insignia/Services/InsigniaRequestProcessService.cs +++ /dev/null @@ -1,129 +0,0 @@ -using BMA.EHR.Application.Repositories; -using BMA.EHR.Insignia.Service.Configuration; -using SocketIOClient; -using System.Security.Claims; - - -namespace BMA.EHR.Insignia.Service.Services; - -public class InsigniaRequestProcessService : BackgroundService -{ - private readonly IBackgroundTaskQueue _queue; - private readonly IHttpContextAccessor _httpContextAccessor; - private readonly IServiceScopeFactory _serviceScopeFactory; - - - public InsigniaRequestProcessService( - IBackgroundTaskQueue queue, - IHttpContextAccessor httpContextAccessor, - IServiceScopeFactory serviceScopeFactory) - { - _queue = queue; - _httpContextAccessor = httpContextAccessor; - _serviceScopeFactory = serviceScopeFactory; - } - - #region " Properties " - - protected string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value; - - protected string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; - - protected bool? IsPlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1"); - - protected string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - - #endregion - - public override async Task StartAsync(CancellationToken cancellationToken) - { - var client = new SocketIO("wss://hrmsbkk.case-collection.com", - new SocketIOOptions - { - // เพิ่ม token ใน handshake.auth - Auth = new { token = AccessToken ?? "" }, - Path = "/api/v1/org-socket" - }); - - client.OnConnected += async (sender, e) => - { - Console.WriteLine("Connected to Socket.IO server"); - await client.EmitAsync("eventName", "Hello from .NET client"); - }; - - await client.ConnectAsync(); - - await base.StartAsync(cancellationToken); - } - //public override async Task StartAsync(CancellationToken cancellationToken) - //{ - //var client = new SocketIO("https://bma-ehr.frappet.synology.me/api/v1/org-socket", - // new SocketIOOptions - // { - // // เพิ่ม token ใน handshake.auth - // Auth = new { token = AccessToken ?? "" } - // }); - - //client.OnConnected += async (sender, e) => - //{ - // Console.WriteLine("Connected to Socket.IO server"); - // await client.EmitAsync("eventName", "Hello from .NET client"); - //}; - - //await client.ConnectAsync(); - - //await base.StartAsync(cancellationToken); - //} - - - - protected override async Task ExecuteAsync(CancellationToken stoppingToken) - { - - - while (!stoppingToken.IsCancellationRequested) - { - try - { - var workItem = await _queue.DequeueAsync(stoppingToken); - if (workItem != null) - { - var startTime = DateTime.Now; - - await workItem(stoppingToken); - - var endTime = DateTime.Now; - var duration = endTime - startTime; - - // Resolve repository from a scope because DbContext is scoped/transient. - using var scope = _serviceScopeFactory.CreateScope(); - var userProfileRepository = (UserProfileRepository)scope.ServiceProvider.GetService(typeof(UserProfileRepository)); - if (userProfileRepository != null) - { - await userProfileRepository.PostInsigniaMessageToSocket("Task completed", UserId ?? "", AccessToken); - } - - } - } - catch (OperationCanceledException) - { - - break; - } - catch (Exception ex) - { - // รอสักครู่ก่อนประมวลผล task ถัดไป เพื่อป้องกันการวนลูปข้อผิดพลาด - await Task.Delay(1000, stoppingToken); - } - } - - } - - public override async Task StopAsync(CancellationToken cancellationToken) - { - - - await base.StopAsync(cancellationToken); - - } -} diff --git a/BMA.EHR.Insignia/WebSocket-Improvements.md b/BMA.EHR.Insignia/WebSocket-Improvements.md deleted file mode 100644 index cb6fc333..00000000 --- a/BMA.EHR.Insignia/WebSocket-Improvements.md +++ /dev/null @@ -1,97 +0,0 @@ -# WebSocket Connection Improvements for InsigniaRequestProcessService - -## ??????????????????? - -### 1. **????????? Configuration** -- ????? `WebSocketConfiguration` class ????????????????????? -- ?????????????????????? ???? appsettings.json -- ?? default values ??????????????????????? - -### 2. **??????????????????????? WebSocket** -- ??? `ImmutableList.Create()` ?????? Transports -- ????? event handlers ???????????????????????? -- ?????? reconnection ????????? -- Thread-safe ???? lock mechanism - -### 3. **??????????????? Logging** -- ??? `ILogger` ??? Console.WriteLine -- ????? emoji ??????????????? log ??????????? -- Log ?????????????????????????? - -### 4. **???????????????????** -- Proper exception handling ???????? -- Graceful handling ??? cancellation -- Delay ??????????????????????????????? busy loop - -### 5. **????????????????? Notification** -- ??????????????????????????????? -- ???????????????????????????????? -- ??????????? retry ????????? - -## ????????? - -### ???????????? appsettings.json -```json -{ - "WebSocket": { - "Url": "https://bma-ehr.frappet.synology.me", - "Path": "/api/v1/org-socket", - "DefaultUserId": "4064c2b2-0414-464a-97c6-4a47c325b9a3", - "ReconnectionDelay": 1000, - "ReconnectionAttempts": 5, - "Timeout": 20000, - "AutoReconnect": true, - "TaskDelayOnError": 5000 - } -} -``` - -### Log Messages ???????? -- ?? = Service started -- ?? = Task processing -- ? = Success operations -- ? = Error/Failure -- ?? = Reconnection attempts -- ?? = WebSocket notifications -- ?? = Service stopping - -## ??????????????????? - -1. **Reliability**: ???????????? WebSocket ??????????????????? -2. **Observability**: ???????????? log ??????? -3. **Configurability**: ??????????????????????? configuration -4. **Maintainability**: ???????????????????????? ?????????? -5. **Resilience**: ????????????????????????? - -## WebSocket Events ????????? - -- `EVENT_CONNECT`: ??????????????? -- `EVENT_DISCONNECT`: ???????????????? -- `EVENT_ERROR`: ???????????????? -- `EVENT_CONNECT_ERROR`: ???????????????????????? -- `EVENT_RECONNECT`: ??????????????????? -- `EVENT_RECONNECT_ERROR`: ???????????????????????????? -- `EVENT_RECONNECT_FAILED`: ????????????????????????? - -## Message Format ??????????? WebSocket - -```javascript -{ - "success": true/false, - "message": "Task Finish" ???? "Task Failed", - "payload": { - "completedAt": "timestamp", - "taskType": "insignia_background_processing", - "duration": 1234.56, // milliseconds - "status": "success" ???? "failed" - // ?????????? error ???? error ??? stackTrace ????? - } -} -``` - -???????? user data: -```javascript -{ - "userId": "4064c2b2-0414-464a-97c6-4a47c325b9a3" -} -``` \ No newline at end of file diff --git a/BMA.EHR.Insignia/appsettings.json b/BMA.EHR.Insignia/appsettings.json index 4e160482..212bf833 100644 --- a/BMA.EHR.Insignia/appsettings.json +++ b/BMA.EHR.Insignia/appsettings.json @@ -1,72 +1,58 @@ { - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "Microsoft": "Information", - "System": "Warning" - } - } - }, - "ElasticConfiguration": { - "Uri": "http://192.168.1.63:9200", - "IndexFormat": "hrms-log-index", - "SystemName": "insignia" - }, - "AllowedHosts": "*", - "ConnectionStrings": { - //"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB", - // "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - // "ExamConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - // "LeaveConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" - - "DefaultConnection": "server=192.168.1.63;user=root;password=12345678;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - "ExamConnection": "server=192.168.1.63;user=root;password=12345678;port=3306;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - "LeaveConnection": "server=192.168.1.63;user=root;password=12345678;port=3306;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" - - //"DefaultConnection": "server=hrms.chin.in.th;user=root;password=adminVM123;port=53636;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - //"DefaultConnection": "server=hrms.chin.in.th;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=53636;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - //"ExamConnection": "server=hrms.chin.in.th;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=53636;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - //"LeaveConnection": "server=hrms.chin.in.th;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=53636;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - //"DisciplineConnection": "server=hrms.chin.in.th;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=53636;database=hrms_discipline;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" - }, - "Jwt": { - //"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", - "Key": "j7C9RO_p4nRtuwCH4z9Db_A_6We42tkD_p4lZtDrezc", - "Issuer": "https://hrmsbkk-id.case-collection.com/realms/hrms" - //"Key": "xY2VR-EFvvNPsMs39u8ooVBWQL6mPwrNJOh3koJFTgU", - //"Issuer": "https://hrms-id.bangkok.go.th/realms/hrms" - }, - "EPPlus": { - "ExcelPackage": { - "LicenseContext": "NonCommercial" - } - }, - "MinIO": { - "Endpoint": "https://edm-s3.frappet.synology.me/", - "AccessKey": "XxtdnJajPjp3hHuKdOMn", - "SecretKey": "rVPzB05giC7bA400cUuIThzT4T9SGCcpcmL3tBBg", - "BucketName": "bma-ehr-fpt" - }, - "KeycloakCron": { - "Hour": "08", - "Minute": "00" - }, - "Protocol": "HTTPS", - "Node": { - "API": "https://bma-ehr.frappet.synology.me/api/v1/probation" - }, - "RabbitMQ": { - "URL": "localhost", - "UserName": "frappet", - "Password": "FPTadmin2357" - }, - "Domain": "https://hrmsbkk.case-collection.com", - "APIPROBATION": "https://hrmsbkk.case-collection.com/api/v1/probation", - "API": "https://hrmsbkk.case-collection.com/api/v1", - "APIV2": "https://hrmsbkk.case-collection.com/api/v2", - "VITE_URL_MGT": "https://hrmsbkk-mgt.case-collection.com", - //"API": "https://bma-ehr.frappet.synology.me/api/v1", - //"API": "https://bma-hrms.bangkok.go.th/api/v1", - "API_KEY": "fKRL16yyEgbyTEJdsMw2h64tGSCmkW685PRtM3CygzX1JOSdptT9UJtpgWwKM8FybRTJups3GTFwj27ZRvlPdIkv3XgCoVJaD5LmR06ozuEPvCCRSdp2WFthg08V5xHc56fTPfZLpr1VmXrhd6dvYhHIqKkQUJR02Rlkss11cLRWEQOssEFVA4xdu2J5DIRO1EM5m7wRRvEwcDB4mYRXD9HH52SMq6iYqUWEWsMwLdbk7QW9yYESUEuzMW5gWrb6vIeWZxJV5bTz1PcWUyR7eO9Fyw1F5DiQYc9JgzTC1mW7cv31fEtTtrfbJYKIb5EbWilqIEUKC6A0UKBDDek35ML0006cqRVm0pvdOH6jeq7VQyYrhdXe59dBEyhYGUIfozoVBvW7Up4QBuOMjyPjSqJPlMBKwaseptfrblxQV1AOOivSBpf1ZcQyOZ8JktRtKUDSuXsmG0lsXwFlI3JCeSHdpVdgZWFYcJPegqfrB6KotR02t9AVkpLs1ZWrixwz" + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Information", + "System": "Warning" + } + } + }, + "ElasticConfiguration": { + "Uri": "http://192.168.1.40:9200", + "IndexFormat": "bma-ehr-log-index", + "SystemName": "insignia" + }, + "AllowedHosts": "*", + "ConnectionStrings": { + //"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB", + "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + //"DefaultConnection": "server=hrms.chin.in.th;user=root;password=adminVM123;port=53636;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", + //"DefaultConnection": "server=hrms.chin.in.th;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=53636;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", + //"ExamConnection": "server=hrms.chin.in.th;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=53636;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", + //"LeaveConnection": "server=hrms.chin.in.th;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=53636;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", + //"DisciplineConnection": "server=hrms.chin.in.th;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=53636;database=hrms_discipline;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + }, + "Jwt": { + //"Key": "j7C9RO_p4nRtuwCH4z9Db_A_6We42tkD_p4lZtDrezc", + //"Issuer": "https://hrms-id.chin.in.th/realms/hrms" + "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", + "Issuer": "https://id.frappet.synology.me/realms/hrms" + }, + "EPPlus": { + "ExcelPackage": { + "LicenseContext": "NonCommercial" + } + }, + "MinIO": { + "Endpoint": "https://edm-s3.frappet.synology.me/", + "AccessKey": "XxtdnJajPjp3hHuKdOMn", + "SecretKey": "rVPzB05giC7bA400cUuIThzT4T9SGCcpcmL3tBBg", + "BucketName": "bma-ehr-fpt" + }, + "KeycloakCron": { + "Hour": "08", + "Minute": "00" + }, + "Protocol": "HTTPS", + "Node": { + "API": "https://bma-ehr.frappet.synology.me/api/v1/probation" + }, + "API": "https://bma-ehr.frappet.synology.me/api/v1", + "RabbitMQ": { + "URL": "localhost", + "UserName": "frappet", + "Password": "FPTadmin2357" + }, + "API_KEY": "fKRL16yyEgbyTEJdsMw2h64tGSCmkW685PRtM3CygzX1JOSdptT9UJtpgWwKM8FybRTJups3GTFwj27ZRvlPdIkv3XgCoVJaD5LmR06ozuEPvCCRSdp2WFthg08V5xHc56fTPfZLpr1VmXrhd6dvYhHIqKkQUJR02Rlkss11cLRWEQOssEFVA4xdu2J5DIRO1EM5m7wRRvEwcDB4mYRXD9HH52SMq6iYqUWEWsMwLdbk7QW9yYESUEuzMW5gWrb6vIeWZxJV5bTz1PcWUyR7eO9Fyw1F5DiQYc9JgzTC1mW7cv31fEtTtrfbJYKIb5EbWilqIEUKC6A0UKBDDek35ML0006cqRVm0pvdOH6jeq7VQyYrhdXe59dBEyhYGUIfozoVBvW7Up4QBuOMjyPjSqJPlMBKwaseptfrblxQV1AOOivSBpf1ZcQyOZ8JktRtKUDSuXsmG0lsXwFlI3JCeSHdpVdgZWFYcJPegqfrB6KotR02t9AVkpLs1ZWrixwz" } diff --git a/BMA.EHR.Insignia/appsettings.websocket.example.json b/BMA.EHR.Insignia/appsettings.websocket.example.json deleted file mode 100644 index 71f28243..00000000 --- a/BMA.EHR.Insignia/appsettings.websocket.example.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "WebSocket": { - "Url": "https://bma-ehr.frappet.synology.me", - "Path": "/api/v1/org-socket", - "DefaultUserId": "4064c2b2-0414-464a-97c6-4a47c325b9a3", - "ReconnectionDelay": 1000, - "ReconnectionAttempts": 5, - "Timeout": 20000, - "AutoReconnect": true, - "TaskDelayOnError": 5000 - } -} \ No newline at end of file diff --git a/BMA.EHR.Leave/BMA.EHR.Leave.csproj b/BMA.EHR.Leave/BMA.EHR.Leave.csproj index e7c58efa..44767778 100644 --- a/BMA.EHR.Leave/BMA.EHR.Leave.csproj +++ b/BMA.EHR.Leave/BMA.EHR.Leave.csproj @@ -10,24 +10,20 @@ . BMA.EHR.Leave.Service BMA.EHR.Leave - - false - $(NoWarn);$(WarningsNotAsErrors) - + $(NoWarn);1591 - + - - $(DockerDefaultDockerfile) - + + $(DockerDefaultDockerfile) + - @@ -45,7 +41,6 @@ - @@ -54,7 +49,6 @@ - @@ -74,21 +68,12 @@ PreserveNewest - - PreserveNewest - - - PreserveNewest - - - - - - PreserveNewest - + + PreserveNewest + diff --git a/BMA.EHR.Leave/Controllers/HolidayController.cs b/BMA.EHR.Leave/Controllers/HolidayController.cs deleted file mode 100644 index 9e2b2de1..00000000 --- a/BMA.EHR.Leave/Controllers/HolidayController.cs +++ /dev/null @@ -1,310 +0,0 @@ -using BMA.EHR.Domain.Common; -using BMA.EHR.Domain.Models.MetaData; -using BMA.EHR.Leave.Service.Request; -using BMA.EHR.Leave.Service.Services; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Swashbuckle.AspNetCore.Annotations; - -namespace BMA.EHR.Leave.Service.Controllers -{ - [Route("api/v{version:apiVersion}/leave/metadata/holiday")] - [ApiVersion("1.0")] - [ApiController] - [Produces("application/json")] - [Authorize] - [SwaggerTag("จัดการข้อมูลปฏิทินวันหยุด")] - public class HolidayController : BaseController - { - #region " Fields " - - private readonly HolidayService _holidayService; - - #endregion - - #region " Constructor and Destructor " - - public HolidayController(HolidayService holidayService) - { - _holidayService = holidayService; - } - - #endregion - - #region " Methods " - - /// - /// อ่านข้อมูลจาก Relational Db โดยแสดงเฉพาะข้อมูลที่ Active เท่านั้น ตามปี - /// - /// ปี่ที่ต้องการ - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("{year:int}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetsAsync(int year) - { - try - { - var items1 = await _holidayService.GetNormalAsync(year); - var items2 = await _holidayService.Get6DayAsync(year); - - return Success(new { Normal = items1, SixDays = items2 }); - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// อ่านข้อมูลจาก Relational Db โดยแสดงเฉพาะข้อมูลที่ Active เท่านั้น ตามเดือน - /// - /// ปี่ที่ต้องการ - /// เดือนที่ต้องการ - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("{year:int}/{month:int}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetsAsyncByMonth(int year, int month) - { - try - { - var items1 = await _holidayService.GetNormalByMonthAsync(year, month); - var items2 = await _holidayService.Get6DayByMonthAsync(year, month); - - return Success(new { Normal = items1, SixDays = items2 }); - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// สร้างรายการวันหยุดใหม่แบบรายการเดียว - /// - /// - /// ทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CreateAsync(Holiday inserted) - { - try - { - // create normal - await _holidayService.CreateAsync(inserted); - - // create 6days - await _holidayService.Create6DayAsync(inserted); - - //save database - await _holidayService.SaveDatabase(); - - return Success(inserted); - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// สร้างรายการวันหยุดใหม่แบบหลายรายการ - /// - /// ช่วงวันที่ที่ต้องการเพิ่ม - /// ประเภทวันหยุด ส่งค่ามาเป็น normal / 6day - /// - /// ทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("range/add/{category}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CreateRangeAsync(List inserted, string category) - { - try - { - await _holidayService.CreateRangeAsync(inserted, category); - - return Success(inserted); - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// แก้ไขรายการวันหยุด - /// - /// รหัส - /// ข้อมูลที่ต้องการแก้ไข - /// - /// ทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("{category}/{id:length(36)}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> UpdateAsync(string id, Holiday updated) - { - try - { - await _holidayService.UpdateAsync(Guid.Parse(id), updated); - - return Success(updated); - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// แก้ไขรายการวันหยุด - /// - /// Group ข่อมูลที่แก้ไข - /// ประเภทวันหยุด ส่งค่ามาเป็น normal / 6day - /// - /// ทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("range/edit/{category}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> UpdateRangeAsync(HolidayUpdateRequest data, string category) - { - try - { - var isNormal = category.ToUpper() == "NORMAL"; - await _holidayService.UpdateRangeAsync(data.history, data.updated, isNormal); - - return Success(data.updated); - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// ลบรายการวันหยุด - /// - /// รหัส - /// - /// ทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("{id:length(36)}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> DeleteAsync(string id) - { - try - { - await _holidayService.DeleteAsync(Guid.Parse(id)); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// ลบรายการวันหยุด - /// - /// ช่วงวันที่ที่ต้องการลบ - /// ประเภทวันหยุด ส่งค่ามาเป็น normal / 6day - /// - /// ทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("range/delete/{category}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> DeleteRangeAsync(List delete, string category) - { - try - { - var isNormal = category.ToUpper() == "NORMAL"; - await _holidayService.DeleteRangeAsync(delete, isNormal); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// คัดลอกข้อมูลวันหยุด โดยระบุปีที่ต้องการคัดลอก และ ปีที่ต้องการบันทึก - /// - /// Request Body - /// - [HttpPost("copy")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CopyAsync([FromBody] HolidayCopyRequest request) - { - try - { - await _holidayService.CopyAsync(request.FromYear, request.ToYear); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// สรุปวันหยุดในแต่ละปี - /// - /// ปี่ที่ต้องการ - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("summary/{year:int}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetDataGroupMonthAsync(int year) - { - try - { - var items = await _holidayService.GetDataGroupMonthAsync(year); - - return Success(items); - } - catch (Exception ex) - { - return Error(ex); - } - } - - #endregion - } -} diff --git a/BMA.EHR.Leave/Controllers/LeaveBeginningController.cs b/BMA.EHR.Leave/Controllers/LeaveBeginningController.cs deleted file mode 100644 index a3b0c124..00000000 --- a/BMA.EHR.Leave/Controllers/LeaveBeginningController.cs +++ /dev/null @@ -1,681 +0,0 @@ -using BMA.EHR.Application.Repositories; -using BMA.EHR.Application.Repositories.Leaves.LeaveRequests; -using BMA.EHR.Domain.Common; -using BMA.EHR.Domain.Models.Leave.Requests; -using BMA.EHR.Infrastructure.Persistence; -using BMA.EHR.Leave.Service.DTOs.LeaveBeginnings; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using OfficeOpenXml.ConditionalFormatting; -using Swashbuckle.AspNetCore.Annotations; -using System.Security.Claims; -using Microsoft.EntityFrameworkCore; -using BMA.EHR.Application.Responses.Profiles; - -namespace BMA.EHR.Leave.Service.Controllers -{ - [Route("api/v{version:apiVersion}/leave-beginning")] - [ApiVersion("1.0")] - [ApiController] - [Produces("application/json")] - [Authorize] - [SwaggerTag("API ระบบลงเวลาและการลา (ข้อมูลวันลายกมาและใช้ไป)")] - public class LeaveBeginningController : BaseController - { - #region " Fields " - - private readonly LeaveBeginningRepository _leaveBeginningRepository; - private readonly LeaveDbContext _context; - private readonly IHttpContextAccessor _httpContextAccessor; - private readonly IWebHostEnvironment _hostingEnvironment; - private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; - private readonly PermissionRepository _permission; - private readonly LeaveRequestRepository _leaveRequestRepository; - - #endregion - - #region " Constuctor and Destructor " - - public LeaveBeginningController(LeaveBeginningRepository leaveBeginningRepository, - LeaveDbContext context, - IHttpContextAccessor httpContextAccessor, - IWebHostEnvironment hostingEnvironment, - IConfiguration configuration, - UserProfileRepository userProfileRepository, - PermissionRepository permission, - LeaveRequestRepository leaveRequestRepository) - { - _leaveBeginningRepository = leaveBeginningRepository; - _context = context; - _httpContextAccessor = httpContextAccessor; - _hostingEnvironment = hostingEnvironment; - _configuration = configuration; - _userProfileRepository = userProfileRepository; - _permission = permission; - _leaveRequestRepository = leaveRequestRepository; - } - - #endregion - - #region " Properties " - - private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value; - - private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; - - private bool? PlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1"); - - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - - private Guid OcId - { - get - { - if (UserId != null || UserId != "") - return _userProfileRepository.GetUserOCId(Guid.Parse(UserId!), AccessToken); - else - return Guid.Empty; - } - } - - #endregion - - #region " Methods " - - /// - /// แสดงรายการ - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("list")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetListAsync([FromBody] GetLeaveBeginningDto req) - { - try - { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_LEAVE_HISTORY"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - - var resData = await _leaveBeginningRepository.GetAllByYearAsync(req.Year); - - if (req.Type != Guid.Empty) - resData = resData.Where(x => x.LeaveTypeId == req.Type).ToList(); - - //กรองสิทธิ์ - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - int? node = profileAdmin?.Node; - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - resData = resData - .Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - resData = resData - .Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - resData = resData - .Where(x => x.RootDnaId == Guid.Parse(nodeId!)).ToList(); - } - // else if (role == "PARENT") - // { - // resData = resData - // .Where(x => x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - resData = resData - .Where(x => - node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) && x.Child1DnaId == null : - node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) && x.Child2DnaId == null : - node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) && x.Child3DnaId == null : - node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) && x.Child4DnaId == null : - node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : true).ToList(); - } - //END - - var result = new List(); - - foreach (var item in resData) - { - result.Add(new - { - item.Id, - item.ProfileId, - FullName = $"{item.Prefix}{item.FirstName} {item.LastName}", - item.Prefix, - item.FirstName, - item.LastName, - item.LeaveTypeId, - LeaveTypeCode = item.LeaveType?.Code, - LeaveType = item.LeaveType?.Name, - item.LeaveYear, - item.LeaveDays, - item.LeaveDaysUsed, - item.LeaveCount, - item.BeginningLeaveDays, - item.BeginningLeaveCount, - item.CreatedAt, - item.CreatedFullName, - item.LastUpdatedAt, - item.LastUpdateFullName - }); - } - - if (req.Keyword != "") - result = result.Where(x => x.FullName!.Contains(req.Keyword)).ToList(); - if (!string.IsNullOrWhiteSpace(req.sortBy)) - { - switch (req.sortBy.ToUpper()) - { - case "FULLNAME": - if (req.descending == true) - result = result.OrderByDescending(x => x.Prefix) - .ThenByDescending(x => x.FirstName) - .ThenByDescending(x => x.LastName) - .ToList(); - else - result = result.OrderBy(x => x.Prefix) - .ThenBy(x => x.FirstName) - .ThenBy(x => x.LastName) - .ToList(); - break; - case "LEAVETYPE": - if (req.descending == true) - result = result.OrderByDescending(x => x.LeaveType).ToList(); - else - result = result.OrderBy(x => x.LeaveType).ToList(); - break; - case "LEAVEYEAR": - if (req.descending == true) - result = result.OrderByDescending(x => x.LeaveYear).ToList(); - else - result = result.OrderBy(x => x.LeaveYear).ToList(); - break; - case "LEAVEDAYS": - if (req.descending == true) - result = result.OrderByDescending(x => x.LeaveDays).ToList(); - else - result = result.OrderBy(x => x.LeaveDays).ToList(); - break; - case "LEAVEDAYSUSED": - if (req.descending == true) - result = result.OrderByDescending(x => x.LeaveDaysUsed).ToList(); - else - result = result.OrderBy(x => x.LeaveDaysUsed).ToList(); - break; - default: break; - } - } - var pageResult = result.Skip((req.Page - 1) * req.PageSize).Take(req.PageSize).ToList(); - - return Success(new { data = pageResult, total = result.Count }); - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// ลบรายการ - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> DeleteAsync(Guid id) - { - try - { - var getPermission = await _permission.GetPermissionAPIAsync("DELETE", "SYS_LEAVE_HISTORY"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var leaveBeginning = await _leaveBeginningRepository.GetByIdAsync(id); - if (leaveBeginning == null) - return Error("ไม่พบข้อมูลที่ต้องการลบ", StatusCodes.Status404NotFound); - await _leaveBeginningRepository.DeleteAsync(leaveBeginning); - return Success("ลบข้อมูลสำเร็จ"); - } - catch (Exception ex) - { - return Error(ex); - } - } - - - /// - /// แสดงรายการจาก Id - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("{id:guid}")] - public async Task> GetByIdAsync(Guid id) - { - try - { - var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_LEAVE_HISTORY"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var leaveBeginning = _leaveBeginningRepository.GetByIdAsync(id); - if (leaveBeginning == null) - return Error("ไม่พบข้อมูลที่ต้องการลบ", StatusCodes.Status404NotFound); - return Success(leaveBeginning); - } - catch (Exception ex) - { - return Error(ex); - } - } - - [HttpGet("update-dna")] - public async Task> UpdateDnaAsync() - { - try - { - var leaveBeginnings = await _context.LeaveBeginnings.ToListAsync(); - foreach (var item in leaveBeginnings) - { - var profile = await _userProfileRepository.GetProfileByProfileIdAsync(item.ProfileId, AccessToken); - if (profile != null) - { - item.RootDnaId = profile.RootDnaId; - item.Child1DnaId = profile.Child1DnaId; - item.Child2DnaId = profile.Child2DnaId; - item.Child3DnaId = profile.Child3DnaId; - item.Child4DnaId = profile.Child4DnaId; - _context.LeaveBeginnings.Update(item); - } - - } - await _context.SaveChangesAsync(); - return Success("อัพเดทข้อมูลสำเร็จ"); - } - catch (Exception ex) - { - return Error(ex); - } - } - - - // - /// แก้ไขรายการ - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("{id:guid}")] - public async Task> PutAsync(Guid id, [FromBody] EditLeaveBeginningDto req) - { - try - { - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - // var profileId = ProfileId ?? Guid.Empty; - // var prefix = Prefix ?? ""; - // var firstName = FirstName ?? ""; - // var lastName = LastName ?? ""; - // var rootDnaId = OrgRootDnaId ?? Guid.Empty; - // var child1DnaId = OrgChild1DnaId ?? Guid.Empty; - // var child2DnaId = OrgChild2DnaId ?? Guid.Empty; - // var child3DnaId = OrgChild3DnaId ?? Guid.Empty; - // var child4DnaId = OrgChild4DnaId ?? Guid.Empty; - - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_LEAVE_HISTORY"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var leaveBeginning = await _leaveBeginningRepository.GetByIdAsync(id); - if (leaveBeginning == null) - return Error("ไม่พบข้อมูลที่ต้องการแก้ไข", StatusCodes.Status404NotFound); - - var profile = await _userProfileRepository.GetProfileByProfileIdAsync(req.ProfileId, AccessToken); - if (profile == null) - { - return Error("ไม่พบข้อมูลข้าราชการหรือลูกจ้าง", StatusCodes.Status404NotFound); - } - - var startFiscalDate = new DateTime(DateTime.Now.Year - 1, 10, 1); - var endFiscalDate = new DateTime(DateTime.Now.Year, 9, 30); - - - if (req.LeaveDaysUsed is null || req.LeaveCount is null) - { - var systemLeaveDays = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUserByProfile(req.ProfileId, req.LeaveTypeId, startFiscalDate, endFiscalDate,endFiscalDate.AddDays(1)); - var systemLeaveCount = await _leaveRequestRepository.GetSumApproveLeaveCountByTypeAndRangeForUserByProfile(req.ProfileId, req.LeaveTypeId, startFiscalDate, endFiscalDate,endFiscalDate.AddDays(1)); - - leaveBeginning.LeaveDaysUsed = req.BeginningLeaveDays + systemLeaveDays; - leaveBeginning.LeaveCount = req.BeginningLeaveCount + systemLeaveCount; - - leaveBeginning.BeginningLeaveDays = req.BeginningLeaveDays; - leaveBeginning.BeginningLeaveCount = req.BeginningLeaveCount; - } - else - { - leaveBeginning.LeaveDaysUsed = req.LeaveDaysUsed; - leaveBeginning.LeaveCount = req.LeaveCount; - leaveBeginning.BeginningLeaveDays = req.BeginningLeaveDays; - leaveBeginning.BeginningLeaveCount = req.BeginningLeaveCount; - //var systemLeaveDays = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUser2(profile.Keycloak ?? Guid.Empty, req.LeaveTypeId, startFiscalDate, endFiscalDate); - //var systemLeaveCount = await _leaveRequestRepository.GetSumApproveLeaveCountByTypeAndRangeForUser2(profile.Keycloak ?? Guid.Empty, req.LeaveTypeId, startFiscalDate, endFiscalDate); - } - - leaveBeginning.LeaveTypeId = req.LeaveTypeId; - leaveBeginning.LeaveYear = req.LeaveYear; - leaveBeginning.LeaveDays = req.LeaveDays; - - - leaveBeginning.ProfileId = req.ProfileId; - leaveBeginning.Prefix = profile.Prefix; - leaveBeginning.FirstName = profile.FirstName; - leaveBeginning.LastName = profile.LastName; - - leaveBeginning.LastUpdateUserId = userId.ToString("D"); - leaveBeginning.LastUpdateFullName = FullName ?? ""; - leaveBeginning.LastUpdatedAt = DateTime.Now; - - leaveBeginning.RootDnaId = profile.RootDnaId; - leaveBeginning.Child1DnaId = profile.Child1DnaId; - leaveBeginning.Child2DnaId = profile.Child2DnaId; - leaveBeginning.Child3DnaId = profile.Child3DnaId; - leaveBeginning.Child4DnaId = profile.Child4DnaId; - - await _leaveBeginningRepository.UpdateAsync(leaveBeginning); - return Success("แก้ไขข้อมูลสำเร็จ"); - } - catch (Exception ex) - { - return Error(ex); - } - } - - - /// - /// สร้างรายการ - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost()] - public async Task> PostAsync([FromBody] EditLeaveBeginningDto req) - { - try - { - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - // var profileId = ProfileId ?? Guid.Empty; - // var prefix = Prefix ?? ""; - // var firstName = FirstName ?? ""; - // var lastName = LastName ?? ""; - // var rootDnaId = OrgRootDnaId ?? Guid.Empty; - // var child1DnaId = OrgChild1DnaId ?? Guid.Empty; - // var child2DnaId = OrgChild2DnaId ?? Guid.Empty; - // var child3DnaId = OrgChild3DnaId ?? Guid.Empty; - // var child4DnaId = OrgChild4DnaId ?? Guid.Empty; - - var getPermission = await _permission.GetPermissionAPIAsync("CREATE", "SYS_LEAVE_HISTORY"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - - var profile = await _userProfileRepository.GetProfileByProfileIdAsync(req.ProfileId, AccessToken); - if (profile == null) - { - return Error("ไม่พบข้อมูลข้าราชการหรือลูกจ้าง", StatusCodes.Status404NotFound); - } - - // check duplicate - var oldData = await _context.LeaveBeginnings.FirstOrDefaultAsync(x => x.ProfileId == req.ProfileId - && x.LeaveTypeId == req.LeaveTypeId - && x.LeaveYear == req.LeaveYear); - - if (oldData is not null) - { - return Error("ไม่สามารถบันทึกข้อมูล เนื่องจากมีข้อมูลในระบบแล้ว"); - } - - var leaveBeginning = new LeaveBeginning(); - - if (req.LeaveDaysUsed is null || req.LeaveCount is null) - { - leaveBeginning.LeaveDaysUsed = req.BeginningLeaveDays; - leaveBeginning.LeaveCount = req.BeginningLeaveCount; - leaveBeginning.BeginningLeaveDays = req.BeginningLeaveDays; - leaveBeginning.BeginningLeaveCount = req.BeginningLeaveCount; - } - else - { - leaveBeginning.LeaveDaysUsed = req.LeaveDaysUsed; - leaveBeginning.LeaveCount = req.LeaveCount; - leaveBeginning.BeginningLeaveDays = req.BeginningLeaveDays; - leaveBeginning.BeginningLeaveCount = req.BeginningLeaveCount; - } - - leaveBeginning.LeaveTypeId = req.LeaveTypeId; - leaveBeginning.LeaveYear = req.LeaveYear; - leaveBeginning.LeaveDays = req.LeaveDays; - - - leaveBeginning.ProfileId = req.ProfileId; - leaveBeginning.Prefix = profile.Prefix; - leaveBeginning.FirstName = profile.FirstName; - leaveBeginning.LastName = profile.LastName; - - leaveBeginning.RootDnaId = profile.RootDnaId; - leaveBeginning.Child1DnaId = profile.Child1DnaId; - leaveBeginning.Child2DnaId = profile.Child2DnaId; - leaveBeginning.Child3DnaId = profile.Child3DnaId; - leaveBeginning.Child4DnaId = profile.Child4DnaId; - - leaveBeginning.CreatedUserId = userId.ToString("D"); - leaveBeginning.CreatedFullName = FullName ?? ""; - leaveBeginning.CreatedAt = DateTime.Now; - - await _leaveBeginningRepository.AddAsync(leaveBeginning); - - return Success(); - - } - catch (Exception ex) - { - return Error(ex); - } - } - - [HttpPut("schedule")] - [AllowAnonymous] - public async Task> ScheduleUpdateLeaveBeginningAsync([FromBody] ScheduleEditLeaveBeginningDto req) - { - try - { - var profile = await _userProfileRepository.GetProfileByProfileIdNoAuthAsync(req.ProfileId, AccessToken); - if(profile == null) - { - return Error("ไม่พบข้อมูลข้าราชการหรือลูกจ้าง", StatusCodes.Status404NotFound); - } - // check duplicate - var oldData = await _context.LeaveBeginnings.FirstOrDefaultAsync(x => x.ProfileId == req.ProfileId - && x.LeaveTypeId == req.LeaveTypeId - && x.LeaveYear == req.LeaveYear); - - if (oldData is not null) - { - //return Error("ไม่สามารถบันทึกข้อมูล เนื่องจากมีข้อมูลในระบบแล้ว"); - oldData.LeaveTypeId = req.LeaveTypeId; - oldData.LeaveYear = req.LeaveYear; - oldData.LeaveDays = req.LeaveDays; - // oldData.LeaveDaysUsed = req.LeaveDaysUsed; - // oldData.LeaveCount = req.LeaveCount; - // oldData.BeginningLeaveDays = req.BeginningLeaveDays; - // oldData.BeginningLeaveCount = req.BeginningLeaveCount; - - oldData.ProfileId = req.ProfileId; - oldData.Prefix = profile.Prefix; - oldData.FirstName = profile.FirstName; - oldData.LastName = profile.LastName; - oldData.RootDnaId = profile.RootDnaId; - oldData.Child1DnaId = profile.Child1DnaId; - oldData.Child2DnaId = profile.Child2DnaId; - oldData.Child3DnaId = profile.Child3DnaId; - oldData.Child4DnaId = profile.Child4DnaId; - - oldData.LastUpdateUserId = ""; - oldData.LastUpdateFullName = "System"; - oldData.LastUpdatedAt = DateTime.Now; - - await _leaveBeginningRepository.UpdateAsync(oldData); - } - else - { - var leaveBeginning = new LeaveBeginning(); - leaveBeginning.LeaveTypeId = req.LeaveTypeId; - leaveBeginning.LeaveYear = req.LeaveYear; - leaveBeginning.LeaveDays = req.LeaveDays; - leaveBeginning.LeaveDaysUsed = 0; - leaveBeginning.LeaveCount = 0; - leaveBeginning.BeginningLeaveDays = 0; - leaveBeginning.BeginningLeaveCount = 0; - - leaveBeginning.ProfileId = req.ProfileId; - leaveBeginning.Prefix = profile.Prefix; - leaveBeginning.FirstName = profile.FirstName; - leaveBeginning.LastName = profile.LastName; - - leaveBeginning.RootDnaId = profile.RootDnaId; - leaveBeginning.Child1DnaId = profile.Child1DnaId; - leaveBeginning.Child2DnaId = profile.Child2DnaId; - leaveBeginning.Child3DnaId = profile.Child3DnaId; - leaveBeginning.Child4DnaId = profile.Child4DnaId; - - leaveBeginning.CreatedUserId = ""; - leaveBeginning.CreatedFullName = "System"; - leaveBeginning.CreatedAt = DateTime.Now; - - await _leaveBeginningRepository.AddAsync(leaveBeginning); - } - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - } - - - [HttpPut("schedule/update-dna")] - [AllowAnonymous] - public async Task> ScheduleUpdateDnaAsync([FromBody] List req) - { - try - { - foreach(var item in req) - { - // var profile = await _userProfileRepository.GetProfileByProfileIdNoAuthAsync(item.ProfileId, AccessToken); - // if(profile == null) - // { - // return Error("ไม่พบข้อมูลข้าราชการหรือลูกจ้าง", StatusCodes.Status404NotFound); - // } - // check duplicate - var oldData = await _context.LeaveBeginnings.Where(x => x.ProfileId == item.ProfileId).ToListAsync(); - - foreach(var o in oldData) - { - o.RootDnaId = item.RootDnaId; - o.Child1DnaId = item.Child1DnaId; - o.Child2DnaId = item.Child2DnaId; - o.Child3DnaId = item.Child3DnaId; - o.Child4DnaId = item.Child4DnaId; - - o.LastUpdateUserId = ""; - o.LastUpdateFullName = "System"; - o.LastUpdatedAt = DateTime.Now; - - await _leaveBeginningRepository.UpdateAsync(o); - } - } - - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - } - - #endregion - } -} diff --git a/BMA.EHR.Leave/Controllers/LeaveController.cs b/BMA.EHR.Leave/Controllers/LeaveController.cs index 7e6bad99..6947557e 100644 --- a/BMA.EHR.Leave/Controllers/LeaveController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveController.cs @@ -3,12 +3,9 @@ using BMA.EHR.Application.Repositories.Commands; using BMA.EHR.Application.Repositories.Leaves.LeaveRequests; using BMA.EHR.Application.Repositories.Leaves.TimeAttendants; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Application.Responses.Leaves; using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; -using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Models.Leave.TimeAttendants; -using BMA.EHR.Domain.Models.Notifications; using BMA.EHR.Domain.Shared; using BMA.EHR.Infrastructure.Persistence; using BMA.EHR.Leave.Service.DTOs.AdditionalCheck; @@ -17,23 +14,19 @@ using BMA.EHR.Leave.Service.DTOs.ChangeRound; using BMA.EHR.Leave.Service.DTOs.CheckIn; using BMA.EHR.Leave.Service.DTOs.DutyTime; using BMA.EHR.Leave.Service.DTOs.LeaveRequest; -using iTextSharp.text; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.ObjectPool; -using Nest; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using RabbitMQ.Client; using RabbitMQ.Client.Events; using Swashbuckle.AspNetCore.Annotations; using System.ComponentModel.DataAnnotations; -using System.Diagnostics; using System.Security.Claims; using System.Text; using System.Threading.Tasks; -using BMA.EHR.Leave.Services; using SearchProfileResultDto = BMA.EHR.Leave.Service.DTOs.ChangeRound.SearchProfileResultDto; namespace BMA.EHR.Leave.Service.Controllers @@ -50,7 +43,6 @@ namespace BMA.EHR.Leave.Service.Controllers private readonly DutyTimeRepository _dutyTimeRepository; private readonly LeaveDbContext _context; - private readonly ApplicationDBContext _appDbContext; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IWebHostEnvironment _hostingEnvironment; private readonly IConfiguration _configuration; @@ -63,8 +55,6 @@ namespace BMA.EHR.Leave.Service.Controllers private readonly LeaveRequestRepository _leaveRequestRepository; private readonly UserCalendarRepository _userCalendarRepository; private readonly PermissionRepository _permission; - private readonly CheckInJobStatusRepository _checkInJobStatusRepository; - private readonly NotificationService _notificationService; private readonly CommandRepository _commandRepository; @@ -78,8 +68,6 @@ namespace BMA.EHR.Leave.Service.Controllers private readonly HttpClient _httpClient; - private readonly LeaveProcessJobStatusRepository _leaveProcessJobStatusRepository; - #endregion #region " Constuctor and Destructor " @@ -101,15 +89,10 @@ namespace BMA.EHR.Leave.Service.Controllers ObjectPool objectPool, PermissionRepository permission, NotificationRepository notificationRepository, - CheckInJobStatusRepository checkInJobStatusRepository, - HttpClient httpClient, - ApplicationDBContext appDbContext, - LeaveProcessJobStatusRepository leaveProcessJobStatusRepository, - NotificationService notificationService) + HttpClient httpClient) { _dutyTimeRepository = dutyTimeRepository; _context = context; - _appDbContext = appDbContext; _httpContextAccessor = httpContextAccessor; _hostingEnvironment = hostingEnvironment; _configuration = configuration; @@ -123,9 +106,7 @@ namespace BMA.EHR.Leave.Service.Controllers _commandRepository = commandRepository; _leaveRequestRepository = leaveRequestRepository; _notificationRepository = notificationRepository; - _checkInJobStatusRepository = checkInJobStatusRepository; - _leaveProcessJobStatusRepository = leaveProcessJobStatusRepository; - _notificationService = notificationService; + _objectPool = objectPool; _permission = permission; @@ -153,13 +134,7 @@ namespace BMA.EHR.Leave.Service.Controllers { get { - // First try to get from claims - var ocIdFromClaims = OrgRootDnaId; - if (ocIdFromClaims.HasValue && ocIdFromClaims.Value != Guid.Empty) - return ocIdFromClaims.Value; - - // Fallback to API call for backward compatibility - if (UserId != null && UserId != "") + if (UserId != null || UserId != "") return _userProfileRepository.GetUserOCId(Guid.Parse(UserId!), AccessToken); else return Guid.Empty; @@ -344,14 +319,6 @@ namespace BMA.EHR.Leave.Service.Controllers oldData.IsDefault = data.IsDefault; oldData.IsActive = data.IsActive; - if (!data.IsActive) - { - // ลบรายการที่เคยผูกไว้ทั้งหมด - var userDutyTimes = await _context.UserDutyTimes.Where(x => x.DutyTimeId == oldData.Id).ToListAsync(); - _context.UserDutyTimes.RemoveRange(userDutyTimes); - await _context.SaveChangesAsync(); - } - await _dutyTimeRepository.UpdateAsync(oldData); return Success(oldData); @@ -447,74 +414,87 @@ namespace BMA.EHR.Leave.Service.Controllers [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CheckTimeAsync(CancellationToken cancellationToken = default) + public async Task> CheckTimeAsync() { var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var profileId = ProfileId ?? Guid.Empty; - - // Get user's last check-in record and profile in parallel - var dataTask = _userTimeStampRepository.GetLastRecord(userId); - //var profileTask = _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); - var defaultRoundTask = _dutyTimeRepository.GetDefaultAsync(); - - await Task.WhenAll(dataTask, defaultRoundTask); - - var data = await dataTask; - //var profile = await profileTask; - var getDefaultRound = await defaultRoundTask; + var data = await _userTimeStampRepository.GetLastRecord(userId); - // if (profile == null) - // { - // throw new Exception(GlobalMessages.DataNotFound); - // } + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); + if (profile == null) + { + throw new Exception(GlobalMessages.DataNotFound); + } + var getDefaultRound = await _dutyTimeRepository.GetDefaultAsync(); if (getDefaultRound == null) { return Error("ไม่พบรอบลงเวลา Default", StatusCodes.Status404NotFound); } - var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profileId); + var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profile.Id); var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); var duty = userRound ?? getDefaultRound; - // Determine check-in status and data - DateTime? checkInTime = null; - Guid? checkInId = null; - - if (data != null) + // TODO : รอดุึงรอบที่ผูกกับ user + //var duty = await _dutyTimeRepository.GetDefaultAsync(); + CheckInResultDto ret; + + if (data == null) + { + ret = new CheckInResultDto + { + StartTimeMorning = duty == null ? "00:00" : duty.StartTimeMorning, + EndTimeMorning = duty == null ? "00:00" : duty.EndTimeMorning, + StartTimeAfternoon = duty == null ? "00:00" : duty.StartTimeAfternoon, + EndTimeAfternoon = duty == null ? "00:00" : duty.EndTimeAfternoon, + Description = duty == null ? "-" : duty.Description, + CheckInTime = null, + CheckInId = null, + }; + } + else { if (data.CheckOut != null) { // fix issue SIT ระบบบันทึกเวลาปฏิบัติงาน>>ลงเวลาเข้า-ออกงาน (กรณีลงเวลาออกอีกวัน) #921 - var currentDate = DateTime.Now.Date; - // ถ้า check-in + check-out ไปแล้วในวันเดียวกัน - if (data.CheckIn.Date == currentDate && data.CheckOut.Value.Date == currentDate) + var cur_date = DateTime.Now.Date; + // ถ้า check-in + check-out ไปแล้ว + if (data.CheckIn.Date == cur_date && data.CheckOut.Value.Date == cur_date) { return Error("คุณได้ทำการลงเวลาเข้าและออกเรียบร้อยแล้ว คุณจะสามารถลงเวลาได้อีกครั้งในวันถัดไป"); } - // ถ้า check-out คนละวัน ให้แสดงว่ายังไม่ได้ check-in วันนี้ + else + { + ret = new CheckInResultDto + { + StartTimeMorning = duty == null ? "00:00" : duty.StartTimeMorning, + EndTimeMorning = duty == null ? "00:00" : duty.EndTimeMorning, + StartTimeAfternoon = duty == null ? "00:00" : duty.StartTimeAfternoon, + EndTimeAfternoon = duty == null ? "00:00" : duty.EndTimeAfternoon, + Description = duty == null ? "-" : duty.Description, + CheckInTime = null, + CheckInId = null, + }; + } } else { - // มี check-in แต่ยังไม่ check-out - checkInTime = data.CheckIn; - checkInId = data.Id; + ret = new CheckInResultDto + { + StartTimeMorning = duty == null ? "00:00" : duty.StartTimeMorning, + EndTimeMorning = duty == null ? "00:00" : duty.EndTimeMorning, + StartTimeAfternoon = duty == null ? "00:00" : duty.StartTimeAfternoon, + EndTimeAfternoon = duty == null ? "00:00" : duty.EndTimeAfternoon, + Description = duty == null ? "-" : duty.Description, + CheckInTime = data.CheckIn, + CheckInId = data.Id, + }; } - } - // Create response DTO (duty is never null here due to fallback logic) - var ret = new CheckInResultDto - { - StartTimeMorning = duty.StartTimeMorning, - EndTimeMorning = duty.EndTimeMorning, - StartTimeAfternoon = duty.StartTimeAfternoon, - EndTimeAfternoon = duty.EndTimeAfternoon, - Description = duty.Description, - CheckInTime = checkInTime, - CheckInId = checkInId, - }; + + } return Success(ret); } @@ -536,38 +516,6 @@ namespace BMA.EHR.Leave.Service.Controllers // prepare data and convert request body and send to queue var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); var currentDate = DateTime.Now; - - // ตรวจสอบและ mark งานเก่าที่ค้างเกิน 30 นาทีเป็น FAILED อัตโนมัติ - var staleJobs = await _checkInJobStatusRepository.GetStalePendingOrProcessingJobsByUserAsync(userId, 30); - if (staleJobs != null && staleJobs.Count > 0) - { - foreach (var staleJob in staleJobs) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(staleJob.TaskId, - $"งานค้างในสถานะ {staleJob.Status} เกิน 30 นาที ระบบทำเครื่องหมายเป็น FAILED อัตโนมัติ"); - } - } - - // ตรวจสอบว่ามีงานที่กำลัง pending หรือ processing อยู่หรือไม่ - var existingJobs = await _checkInJobStatusRepository.GetPendingOrProcessingJobsAsync(userId); - if (existingJobs != null && existingJobs.Count > 0) - { - // กรองเฉพาะงานที่เป็นประเภทเดียวกัน (CHECK_IN หรือ CHECK_OUT) - var checkType = data.CheckInId == null ? "CHECK_IN" : "CHECK_OUT"; - var sameTypeJob = existingJobs.FirstOrDefault(j => j.CheckType == checkType); - - if (sameTypeJob != null) - { - - return Error($"มีงาน {checkType} กำลังดำเนินการอยู่", StatusCodes.Status500InternalServerError); - // var timeDiff = (currentDate - sameTypeJob.CreatedDate).TotalMinutes; - // if (timeDiff < 2) - // { - // return Error($"มีงาน {checkType} กำลังดำเนินการอยู่ กรุณารอสักครู่", StatusCodes.Status409Conflict); - // } - } - } - var checkFileBytes = new byte[0]; // fix issue : ระบบลงเวลาปฏิบัติงาน>>รูปภาพไม่แสดงในฝั่งของ Admin #804 @@ -581,15 +529,11 @@ namespace BMA.EHR.Leave.Service.Controllers } } - // add task id for check in queue - string taskId = Guid.NewGuid().ToString(); - var checkData = new CheckTimeDtoRB { UserId = userId, CurrentDate = currentDate, CheckInId = data.CheckInId, - TaskId = Guid.Parse(taskId), Lat = data.Lat, Lon = data.Lon, POI = data.POI, @@ -602,8 +546,6 @@ namespace BMA.EHR.Leave.Service.Controllers }; var channel = _objectPool.Get(); - CheckInJobStatus? jobStatus = null; - try { var queue = _configuration["Rabbit:Queue"] ?? "basic-queue"; @@ -611,240 +553,25 @@ namespace BMA.EHR.Leave.Service.Controllers var serializedObject = JsonConvert.SerializeObject(checkData); var body = Encoding.UTF8.GetBytes(serializedObject); + // add task id for check in queue + string taskId = Guid.NewGuid().ToString(); var properties = channel.CreateBasicProperties(); properties.Persistent = true; - properties.MessageId = taskId; - - // ส่งไป RabbitMQ + properties.MessageId = userId.ToString("D");// ระบบลงเวลาต้องมีการเช็คสถานะใน rabbitMQ ด้วยว่ามีการรอรันอยู่ไหม ลงเวลาเข้า/ออกงาน #894 + channel.BasicPublish(exchange: "", - routingKey: queue, - basicProperties: properties, - body: body); + routingKey: queue, + basicProperties: properties, + body: body); - // Clear Byte data Before Save to DB - checkData.CheckInFileBytes = new byte[0]; - - // บันทึกสถานะงานหลังส่งไป RabbitMQ - jobStatus = new CheckInJobStatus - { - TaskId = Guid.Parse(taskId), - KeycloakUserId = userId, - CreatedDate = currentDate, - Status = "PENDING", - CheckType = data.CheckInId == null ? "CHECK_IN" : "CHECK_OUT", - CheckInId = data.CheckInId, - AdditionalData = JsonConvert.SerializeObject(checkData) - }; - await _checkInJobStatusRepository.AddAsync(jobStatus); - return Success(new { date = currentDate, taskId = taskId, keycloakId = userId }); } - catch (Exception ex) - { - // ถ้าส่งไป queue ไม่สำเร็จ ให้ลบ job status ที่สร้างไว้ออก - if (jobStatus != null) - { - try - { - await _checkInJobStatusRepository.DeleteAsync(jobStatus); - } - catch - { - // Ignore delete error - } - } - return Error($"ไม่สามารถส่งงานไปยัง Queue ได้: {ex.Message}"); - //throw new Exception($"ไม่สามารถส่งงานไปยัง Queue ได้: {ex.Message}"); - } finally { _objectPool.Return(channel); } } - /// - /// ตรวจสอบสถานะงาน check-in ด้วย Task ID - /// - /// Task ID ที่ได้จากการเรียก CheckInAsync - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// ไม่พบข้อมูลงาน - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("job-status/{taskId:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status404NotFound)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetJobStatusAsync(Guid taskId) - { - var jobStatus = await _checkInJobStatusRepository.GetByTaskIdAsync(taskId); - - if (jobStatus == null) - { - return Error("ไม่พบข้อมูลงาน", StatusCodes.Status404NotFound); - } - - var result = new - { - taskId = jobStatus.TaskId, - keycloakUserId = jobStatus.KeycloakUserId, - status = jobStatus.Status, - checkType = jobStatus.CheckType, - checkInId = jobStatus.CheckInId, - createdDate = jobStatus.CreatedDate, - processingDate = jobStatus.ProcessingDate, - completedDate = jobStatus.CompletedDate, - errorMessage = jobStatus.ErrorMessage, - additionalData = jobStatus.AdditionalData != null ? - JsonConvert.DeserializeObject(jobStatus.AdditionalData) : null - }; - - return Success(result); - } - - /// - /// ดึงรายการงานที่ยัง pending หรือ processing ของผู้ใช้ - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("pending-jobs")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetPendingJobsAsync() - { - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var jobs = await _checkInJobStatusRepository.GetPendingOrProcessingJobsAsync(userId); - - var result = jobs.Select(job => new - { - taskId = job.TaskId, - status = job.Status, - checkType = job.CheckType, - checkInId = job.CheckInId, - createdDate = job.CreatedDate, - processingDate = job.ProcessingDate - }).ToList(); - - return Success(new { count = result.Count, jobs = result }); - } - - /// - /// ประมวลผลงาน CheckIn ที่ค้างอยู่ในสถานะ PENDING/PROCESSING เกินเวลาที่กำหนดใหม่อีกครั้ง - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("reprocess-stale-checkin-jobs")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> ReprocessStaleCheckInJobsAsync([FromQuery] int timeoutMinutes = 30) - { - try - { - var staleJobs = await _checkInJobStatusRepository.GetStalePendingOrProcessingJobsAsync(timeoutMinutes); - - if (staleJobs == null || staleJobs.Count == 0) - { - return Success(new { message = "ไม่พบงานที่ค้างอยู่", count = 0 }); - } - - var results = new List(); - foreach (var job in staleJobs) - { - try - { - // อ่านข้อมูลเดิมจาก AdditionalData - if (string.IsNullOrEmpty(job.AdditionalData)) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(job.TaskId, - "ไม่พบข้อมูลสำหรับประมวลผลซ้ำ (AdditionalData is null)"); - results.Add(new - { - taskId = job.TaskId, - keycloakUserId = job.KeycloakUserId, - checkType = job.CheckType, - createdDate = job.CreatedDate, - previousStatus = job.Status, - newStatus = "FAILED", - errorMessage = "ไม่พบข้อมูลสำหรับประมวลผลซ้ำ" - }); - continue; - } - - var checkData = JsonConvert.DeserializeObject(job.AdditionalData); - checkData.UserId = job.KeycloakUserId; - checkData.CurrentDate = job.CreatedDate; - if (checkData == null) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(job.TaskId, - "ไม่สามารถอ่านข้อมูลสำหรับประมวลผลซ้ำได้"); - results.Add(new - { - taskId = job.TaskId, - keycloakUserId = job.KeycloakUserId, - checkType = job.CheckType, - createdDate = job.CreatedDate, - previousStatus = job.Status, - newStatus = "FAILED", - errorMessage = "ไม่สามารถอ่านข้อมูลสำหรับประมวลผลซ้ำได้" - }); - continue; - } - - // ตั้ง TaskId ให้ตรงกับ job เดิม - checkData.TaskId = job.TaskId; - - // เรียก ProcessCheckInAsync ด้วยข้อมูลเดิม - var processResult = await ProcessCheckInAsync(checkData); - - results.Add(new - { - taskId = job.TaskId, - keycloakUserId = job.KeycloakUserId, - checkType = job.CheckType, - createdDate = job.CreatedDate, - previousStatus = job.Status, - result = processResult - }); - } - catch (Exception ex) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(job.TaskId, - $"เกิดข้อผิดพลาดในการประมวลผลซ้ำ: {ex.Message}"); - results.Add(new - { - taskId = job.TaskId, - keycloakUserId = job.KeycloakUserId, - checkType = job.CheckType, - createdDate = job.CreatedDate, - previousStatus = job.Status, - newStatus = "FAILED", - errorMessage = ex.Message - }); - } - } - - return Success(new - { - message = $"ประมวลผลซ้ำงาน {staleJobs.Count} รายการเสร็จสิ้น", - count = staleJobs.Count, - jobs = results - }); - } - catch (Exception ex) - { - return Error(ex); - } - } - [HttpGet("check-status")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status401Unauthorized)] @@ -852,62 +579,61 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> CheckInCheckStatus() { var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - // var currentDate = DateTime.Now; - // var channel = _objectPool.Get(); + var currentDate = DateTime.Now; + var channel = _objectPool.Get(); try { - // var _url = _configuration["Rabbit:URL"] ?? ""; - // var _queue = _configuration["Rabbit:Queue"] ?? "basic-queue"; + var _url = _configuration["Rabbit:URL"] ?? ""; + var _queue = _configuration["Rabbit:Queue"] ?? "basic-queue"; - // // Step 1: ตรวจสอบจำนวน message ทั้งหมดในคิว - // string queueUrl = $"{_url}{_queue}"; - // var queueResponse = await _httpClient.GetAsync(queueUrl); - // if (!queueResponse.IsSuccessStatusCode) - // { - // return Error("Error accessing RabbitMQ API", (int)queueResponse.StatusCode); - // } + // Step 1: ตรวจสอบจำนวน message ทั้งหมดในคิว + string queueUrl = $"{_url}{_queue}"; + var queueResponse = await _httpClient.GetAsync(queueUrl); + if (!queueResponse.IsSuccessStatusCode) + { + return Error("Error accessing RabbitMQ API", (int)queueResponse.StatusCode); + } - // var queueContent = await queueResponse.Content.ReadAsStringAsync(); - // var queueData = JObject.Parse(queueContent); - // int totalMessages = queueData["messages"]?.Value() ?? 0; + var queueContent = await queueResponse.Content.ReadAsStringAsync(); + var queueData = JObject.Parse(queueContent); + int totalMessages = queueData["messages"]?.Value() ?? 0; - // // Step 2: วนลูปดึง message ทีละ 100 งาน - // int batchSize = 100; - // var allMessages = new List(); - // int processedMessages = 0; + // Step 2: วนลูปดึง message ทีละ 100 งาน + int batchSize = 100; + var allMessages = new List(); + int processedMessages = 0; - // while (processedMessages < totalMessages) - // { - // var requestBody = new StringContent( - // $"{{\"count\":{batchSize},\"requeue\":true,\"encoding\":\"auto\",\"ackmode\":\"ack_requeue_true\"}}", - // Encoding.UTF8, - // "application/json" - // ); + while (processedMessages < totalMessages) + { + var requestBody = new StringContent( + $"{{\"count\":{batchSize},\"requeue\":true,\"encoding\":\"auto\",\"ackmode\":\"ack_requeue_true\"}}", + Encoding.UTF8, + "application/json" + ); - // string getMessagesUrl = $"{_url}{_queue}/get"; - // var response = await _httpClient.PostAsync(getMessagesUrl, requestBody); - // if (!response.IsSuccessStatusCode) - // { - // return StatusCode((int)response.StatusCode, "Error retrieving messages from RabbitMQ."); - // } + string getMessagesUrl = $"{_url}{_queue}/get"; + var response = await _httpClient.PostAsync(getMessagesUrl, requestBody); + if (!response.IsSuccessStatusCode) + { + return StatusCode((int)response.StatusCode, "Error retrieving messages from RabbitMQ."); + } - // var content = await response.Content.ReadAsStringAsync(); - // var messages = JArray.Parse(content); + var content = await response.Content.ReadAsStringAsync(); + var messages = JArray.Parse(content); - // if (messages.Count == 0) - // { - // break; - // } + if (messages.Count == 0) + { + break; + } - // processedMessages += messages.Count; - // allMessages.AddRange(messages.Select(m => m["properties"].ToString())); - // } + processedMessages += messages.Count; + allMessages.AddRange(messages.Select(m => m["properties"].ToString())); + } - var jobs = await _checkInJobStatusRepository.GetPendingOrProcessingJobsAsync(userId); // Step 3: ค้นหา taskIds ที่อยู่ใน messages ทั้งหมด - //var foundTasks = allMessages.FirstOrDefault(x => x.Contains(userId.ToString("D"))); + var foundTasks = allMessages.FirstOrDefault(x => x.Contains(userId.ToString("D"))); - return Success(new { keycloakId = userId, InQueue = (jobs != null && jobs.Count > 0) }); + return Success(new { keycloakId = userId, InQueue = foundTasks != null }); } catch (Exception ex) @@ -916,7 +642,7 @@ namespace BMA.EHR.Leave.Service.Controllers } finally { - //_objectPool.Return(channel); + _objectPool.Return(channel); } } @@ -1053,490 +779,139 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> ProcessCheckInAsync([FromBody] CheckTimeDtoRB data) { var userId = data.UserId ?? Guid.Empty; - var taskId = data.TaskId ?? Guid.Empty; + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, data.Token); - try + if (profile == null) + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + + if (data.CheckInFileName == "no-file") throw new Exception(GlobalMessages.NoFileToUpload); + var currentDate = data.CurrentDate ?? DateTime.Now; + + var check_status = data.CheckInId == null ? "check-in-picture" : "check-out-picture"; + + var fileName = $"{_bucketName}/{userId}/{currentDate.ToString("dd-MM-yyyy")}/{check_status}/{data.CheckInFileName}"; + using (var ms = new MemoryStream(data.CheckInFileBytes ?? new byte[0])) { - // อัปเดตสถานะเป็น PROCESSING - if (taskId != Guid.Empty) + await _minIOService.UploadFileAsync(fileName, ms); + } + + var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); + if (defaultRound == null) + { + return Error("ไม่พบรอบการลงเวลาทำงาน Default", StatusCodes.Status404NotFound); + } + + var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profile.Id); + var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; + var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); + + // TODO : รอดุึงรอบที่ผูกกับ user + var duty = userRound ?? defaultRound; + + // create check in object + if (data.CheckInId == null) + { + // validate duplicate check in + var currentCheckIn = await _userTimeStampRepository.GetTimestampByDateAsync(userId, currentDate); + + if (currentCheckIn != null) { - await _checkInJobStatusRepository.UpdateToProcessingAsync(taskId); + return Error(new Exception("ไม่สามารถลงเวลาได้ เนื่องจากมีการลงเวลาในวันนี้แล้ว!"), StatusCodes.Status400BadRequest); } - var profile = await _userProfileRepository.GetProfileByCheckInAsync(userId, data.Token); - - if (profile == null) + var checkin = new UserTimeStamp { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "เกิดข้อผิดพลาดจากการเรียก API [GetProfileByCheckInAsync] : ไม่พบข้อมูลผู้ใช้"); - await _notificationService.SendNotificationAsync(data.Token, true, - $"ลงเวลาไม่สำเร็จ \r\nเนื่องจาก ไม่พบข้อมูลผู้ใช้ \r\nกรุณาลองใหม่อีกครั้ง"); - //var staffList = await _userProfileRepository.GetOCStaffAsync(profile) - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } + KeycloakUserId = userId, + CheckInLat = data.Lat, + CheckInLon = data.Lon, + IsLocationCheckIn = data.IsLocation, + CheckInLocationName = data.LocationName, + CheckInPOI = data.POI, + CheckInRemark = data.Remark, + CheckInImageUrl = fileName, + CheckIn = currentDate, + Prefix = profile.Prefix, + FirstName = profile.FirstName, + LastName = profile.LastName, + CitizenId = profile.CitizenId, - var currentDate = data.CurrentDate ?? DateTime.Now; + Root = profile.Root, + Child1 = profile.Child1, + Child2 = profile.Child2, + Child3 = profile.Child3, + Child4 = profile.Child4, - if (data.CheckInFileName == "no-file") + RootId = profile.RootId, + Child1Id = profile.Child1Id, + Child2Id = profile.Child2Id, + Child3Id = profile.Child3Id, + Child4Id = profile.Child4Id, + Gender = profile.Gender, + + ProfileId = profile.Id, + ProfileType = profile.ProfileType, + }; + + var checkInStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) > + DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}") ? + + DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) > + DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? + "ABSENT" : + "LATE" : + "NORMAL"; + + // process - รอทำใน queue + var checkin_process = new ProcessUserTimeStamp { - //throw new Exception(GlobalMessages.NoFileToUpload); - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, GlobalMessages.NoFileToUpload); - await _notificationService.SendNotificationAsync(data.Token, true, - $"ลงเวลาไม่สำเร็จ \r\nเนื่องจาก {GlobalMessages.NoFileToUpload}\r\nกรุณาลองใหม่อีกครั้ง"); + KeycloakUserId = userId, + CheckInLat = data.Lat, + CheckInLon = data.Lon, + IsLocationCheckIn = data.IsLocation, + CheckInLocationName = data.LocationName, + CheckInPOI = data.POI, + CheckInRemark = data.Remark, + CheckInImageUrl = fileName, + CheckIn = currentDate, + CheckInStatus = checkInStatus, + Prefix = profile.Prefix, + FirstName = profile.FirstName, + LastName = profile.LastName, + CitizenId = profile.CitizenId, - // send notification to user - var noti1 = new Notification - { - Body = - $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจาก {GlobalMessages.NoFileToUpload}", - ReceiverUserId = profile.Id, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti1); - await _appDbContext.SaveChangesAsync(); + Root = profile.Root, + Child1 = profile.Child1, + Child2 = profile.Child2, + Child3 = profile.Child3, + Child4 = profile.Child4, - return Error(GlobalMessages.NoFileToUpload, StatusCodes.Status400BadRequest); - } + RootId = profile.RootId, + Child1Id = profile.Child1Id, + Child2Id = profile.Child2Id, + Child3Id = profile.Child3Id, + Child4Id = profile.Child4Id, + Gender = profile.Gender, - // last check-in record - var lastCheckIn = await _userTimeStampRepository.GetLastRecord(userId); + ProfileId = profile.Id, + ProfileType = profile.ProfileType, + }; - var check_status = data.CheckInId == null ? "check-in-picture" : "check-out-picture"; - var check_out_status = "check-out-picture"; + await _userTimeStampRepository.AddAsync(checkin); + await _processUserTimeStampRepository.AddAsync(checkin_process); + } + else + { - // ถ้าไม่มี CheckInFileBytes ให้ใช้ภาพ blank.jpeg แทน - var fileBytes = data.CheckInFileBytes; - if (fileBytes == null || fileBytes.Length == 0) + + var checkout = await _userTimeStampRepository.GetByIdAsync(data.CheckInId.Value); + + var currentCheckInProcess = await _processUserTimeStampRepository.GetTimestampByDateAsync(userId, checkout.CheckIn.Date); + + var checkout_process = await _processUserTimeStampRepository.GetByIdAsync(currentCheckInProcess.Id); + + + if (checkout != null) { - var blankPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "blank.jpeg"); - fileBytes = await System.IO.File.ReadAllBytesAsync(blankPath); - data.CheckInFileName = "blank.jpeg"; - } - - var fileName = - $"{_bucketName}/{userId}/{currentDate.ToString("dd-MM-yyyy")}/{check_status}/{data.CheckInFileName}"; - var fileNameCheckOut = - $"{_bucketName}/{userId}/{currentDate.ToString("dd-MM-yyyy")}/{check_out_status}/{data.CheckInFileName}"; - using (var ms = new MemoryStream(fileBytes)) - { - try - { - await _minIOService.UploadFileAsync(fileName, ms); - } - catch (Exception ex) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, - $"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}"); - await _notificationService.SendNotificationAsync(data.Token, true, - $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่สามารถอัปโหลดรูปภาพได้ {ex.Message}\r\nกรุณาลองใหม่อีกครั้ง"); - - // send notification to user - var noti2 = new Notification - { - Body = - $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากไม่สามารถอัปโหลดรูปภาพได้ {ex.Message}", - ReceiverUserId = profile.Id, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti2); - await _appDbContext.SaveChangesAsync(); - - return Error($"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}", - StatusCodes.Status500InternalServerError); - } - } - - if (lastCheckIn != null && lastCheckIn.CheckOut == null) - { - using (var ms2 = new MemoryStream(data.CheckInFileBytes ?? new byte[0])) - { - try - { - await _minIOService.UploadFileAsync(fileNameCheckOut, ms2); - } - catch (Exception ex) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, - $"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}"); - await _notificationService.SendNotificationAsync(data.Token, true, - $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่สามารถอัปโหลดรูปภาพได้ {ex.Message}\r\nกรุณาลองใหม่อีกครั้ง"); - - // send notification to user - var noti3 = new Notification - { - Body = - $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากไม่สามารถอัปโหลดรูปภาพได้ {ex.Message}", - ReceiverUserId = profile.Id, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti3); - await _appDbContext.SaveChangesAsync(); - - return Error($"ไม่สามารถอัปโหลดรูปภาพได้: {ex.Message}", - StatusCodes.Status500InternalServerError); - } - } - } - - var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); - if (defaultRound == null) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่พบรอบการลงเวลาทำงาน Default"); - await _notificationService.SendNotificationAsync(data.Token, true, - $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่พบรอบการลงเวลาทำงาน Default\r\nกรุณาลองใหม่อีกครั้ง"); - // send notification to user - var noti1 = new Notification - { - Body = $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากไม่พบรอบการลงเวลาทำงาน Default", - ReceiverUserId = profile.Id, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti1); - await _appDbContext.SaveChangesAsync(); - return Error("ไม่พบรอบการลงเวลาทำงาน Default", StatusCodes.Status404NotFound); - } - - var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profile.Id, currentDate); - var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; - var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); - - // TODO : รอดุึงรอบที่ผูกกับ user - var duty = userRound ?? defaultRound; - - // create check in object - if (data.CheckInId == null) - { - if (lastCheckIn != null && lastCheckIn.CheckOut == null) - { - var checkout = await _userTimeStampRepository.GetByIdAsync(lastCheckIn!.Id); - if(checkout != null) - { - var currentCheckInProcess = await _processUserTimeStampRepository.GetTimestampByDateAsync(userId, checkout.CheckIn.Date); - var checkout_process = await _processUserTimeStampRepository.GetByIdAsync(currentCheckInProcess!.Id); - var endTime1 = ""; - var startTime1 = ""; - var endTimeMorning1 = ""; - if (!data.IsLocation && data.LocationName == "ไปประชุม / อบรม / สัมมนา") - { - startTime1 = "13:00"; - endTime1 = "14:30"; - endTimeMorning1 = "12:00"; - } - else if (!data.IsLocation && data.LocationName == "ปฏิบัติงานในจุดบริการด่วนมหานคร") - { - startTime1 = "13:00"; - endTime1 = "18:30"; - endTimeMorning1 = "12:00"; - } - else - { - endTime1 = duty.EndTimeAfternoon; - startTime1 = duty.StartTimeAfternoon; - endTimeMorning1 = duty.EndTimeMorning; - } - - string checkOutStatus = "NORMAL"; - var leaveReq1 = await _leaveRequestRepository.GetLeavePeriodAsync(userId, currentDate.Date); - if (leaveReq1 != null) - { - var leaveRange = leaveReq1.LeaveRangeEnd == null ? "" : leaveReq1.LeaveRangeEnd.ToUpper(); - if (leaveRange == "AFTERNOON" || leaveRange == "ALL") - { - if(DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) < - DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {endTimeMorning1}")) - checkOutStatus = "ABSENT"; - else - checkOutStatus = "NORMAL"; - } - else - { - // fix issue : SIT ระบบบันทึกเวลาปฏิบัติงาน>>ลงเวลาเข้า-ออกงาน (กรณีลงเวลาออกอีกวัน) #921 - var currentDateTime = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")); - var dutyEndTimeAfternoon = DateTime.Parse($"{checkout.CheckIn.ToString("yyyy-MM-dd")} {endTime1}"); - var dutyEndTimeMorning = DateTime.Parse($"{checkout.CheckIn.ToString("yyyy-MM-dd")} {endTimeMorning1}"); - - - if(currentDateTime.Date > checkout.CheckIn.Date) - { - // ถ้า check-out เป็นวันถัดไป สถานะปกติเสมอ - checkOutStatus = "NORMAL"; - } - else - { - // ถ้า check-out เป็นวันเดียวกับ check-in - // ตรวจสอบเวลาว่าสิ้นสุดก่อนบ่ายหรือไม่ - if(currentDateTime < dutyEndTimeMorning) // ถ้าออกก่อนเวลาสิ้นสุดตอนเช้า ขาดราชการ - { - checkOutStatus = "ABSENT"; - } - else if(currentDateTime >= dutyEndTimeAfternoon) // ถ้าออกหลังเวลาสิ้นสุดตอนบ่าย ปกติ - { - checkOutStatus = "NORMAL"; - } - else - { - checkOutStatus = "ABSENT"; - } - } - } - } - else - { - // fix issue : SIT ระบบบันทึกเวลาปฏิบัติงาน>>ลงเวลาเข้า-ออกงาน (กรณีลงเวลาออกอีกวัน) #921 - var currentDateTime = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")); - var dutyEndTimeAfternoon = DateTime.Parse($"{checkout.CheckIn.ToString("yyyy-MM-dd")} {endTime1}"); - var dutyEndTimeMorning = DateTime.Parse($"{checkout.CheckIn.ToString("yyyy-MM-dd")} {endTimeMorning1}"); - - - if(currentDateTime.Date > checkout.CheckIn.Date) - { - // ถ้า check-out เป็นวันถัดไป สถานะปกติเสมอ - checkOutStatus = "NORMAL"; - } - else - { - // ถ้า check-out เป็นวันเดียวกับ check-in - // ตรวจสอบเวลาว่าสิ้นสุดก่อนบ่ายหรือไม่ - if(currentDateTime < dutyEndTimeMorning) // ถ้าออกก่อนเวลาสิ้นสุดตอนเช้า ขาดราชการ - { - checkOutStatus = "ABSENT"; - } - else if(currentDateTime >= dutyEndTimeAfternoon) // ถ้าออกหลังเวลาสิ้นสุดตอนบ่าย ปกติ - { - checkOutStatus = "NORMAL"; - } - else - { - checkOutStatus = "ABSENT"; - } - } - - } - - if (checkout_process != null) - { - checkout_process.CheckOutLat = data.Lat; - checkout_process.CheckOutLon = data.Lon; - checkout_process.IsLocationCheckOut = data.IsLocation; - checkout_process.CheckOutLocationName = data.LocationName; - checkout_process.CheckOutPOI = data.POI; - checkout_process.CheckOutRemark = data.Remark; - checkout_process.CheckOutImageUrl = fileNameCheckOut; - checkout_process.CheckOut = currentDate; - checkout_process.CheckOutStatus = checkOutStatus; - - await _processUserTimeStampRepository.UpdateAsync(checkout_process); - } - } - } - - // validate duplicate check in - var currentCheckIn = await _userTimeStampRepository.GetTimestampByDateAsync(userId, currentDate); - - if (currentCheckIn != null) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่สามารถลงเวลาได้ เนื่องจากมีการลงเวลาในวันนี้แล้ว"); - await _notificationService.SendNotificationAsync(data.Token, true,$"ลงเวลาไม่สำเร็จ \r\nเนื่องจากมีการลงเวลาในวันนี้แล้ว\r\nกรุณาลองใหม่อีกครั้ง"); - - // send notification to user - var noti1 = new Notification - { - Body = $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากมีการลงเวลาในวันนี้แล้ว", - ReceiverUserId = profile.Id, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti1); - await _appDbContext.SaveChangesAsync(); - - return Error(new Exception("ไม่สามารถลงเวลาได้ เนื่องจากมีการลงเวลาในวันนี้แล้ว!"), StatusCodes.Status400BadRequest); - } - - var checkin = new UserTimeStamp - { - KeycloakUserId = userId, - CheckInLat = data.Lat, - CheckInLon = data.Lon, - IsLocationCheckIn = data.IsLocation, - CheckInLocationName = data.LocationName, - CheckInPOI = data.POI, - CheckInRemark = data.Remark, - CheckInImageUrl = fileName, - CheckIn = currentDate, - Prefix = profile.Prefix, - FirstName = profile.FirstName, - LastName = profile.LastName, - CitizenId = profile.CitizenId, - - Root = profile.Root, - Child1 = profile.Child1, - Child2 = profile.Child2, - Child3 = profile.Child3, - Child4 = profile.Child4, - - RootId = profile.RootId, - Child1Id = profile.Child1Id, - Child2Id = profile.Child2Id, - Child3Id = profile.Child3Id, - Child4Id = profile.Child4Id, - Gender = profile.Gender, - - ProfileId = profile.Id, - ProfileType = profile.ProfileType, - - RootDnaId = profile.RootDnaId, - Child1DnaId = profile.Child1DnaId, - Child2DnaId = profile.Child2DnaId, - Child3DnaId = profile.Child3DnaId, - Child4DnaId = profile.Child4DnaId, - }; - - var startTime = ""; - var endTime = ""; - if (!data.IsLocation && data.LocationName == "ไปประชุม / อบรม / สัมมนา") - { - //startTime = "09:30"; - startTime = "10:30"; - endTime = "12:00"; - } - else if (!data.IsLocation && data.LocationName == "ปฏิบัติงานในจุดบริการด่วนมหานคร") - { - //startTime = "09:30"; - startTime = "10:30"; - endTime = "12:00"; - } - else - { - startTime = duty.StartTimeMorning; - endTime = duty.EndTimeMorning; - } - - string checkInStatus = "NORMAL"; - var leaveReq = await _leaveRequestRepository.GetLeavePeriodAsync(userId, currentDate.Date); - if (leaveReq != null) - { - var leaveRange = leaveReq.LeaveRange == null ? "" : leaveReq.LeaveRange.ToUpper(); - if (leaveRange == "MORNING" || leaveRange == "ALL") - checkInStatus = "NORMAL"; - else - { - checkInStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) > - DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {startTime}") ? - DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) > - DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? - "ABSENT" : - "LATE" : - "NORMAL"; - } - } - else - { - checkInStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) > - DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {startTime}") ? - DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) > - DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? - "ABSENT" : - "LATE" : - "NORMAL"; - } - - - // process - รอทำใน queue - var checkin_process = new ProcessUserTimeStamp - { - KeycloakUserId = userId, - CheckInLat = data.Lat, - CheckInLon = data.Lon, - IsLocationCheckIn = data.IsLocation, - CheckInLocationName = data.LocationName, - CheckInPOI = data.POI, - CheckInRemark = data.Remark, - CheckInImageUrl = fileName, - CheckIn = currentDate, - CheckInStatus = checkInStatus, - Prefix = profile.Prefix, - FirstName = profile.FirstName, - LastName = profile.LastName, - CitizenId = profile.CitizenId, - - Root = profile.Root, - Child1 = profile.Child1, - Child2 = profile.Child2, - Child3 = profile.Child3, - Child4 = profile.Child4, - - RootId = profile.RootId, - Child1Id = profile.Child1Id, - Child2Id = profile.Child2Id, - Child3Id = profile.Child3Id, - Child4Id = profile.Child4Id, - Gender = profile.Gender, - - ProfileId = profile.Id, - ProfileType = profile.ProfileType, - - - RootDnaId = profile.RootDnaId, - Child1DnaId = profile.Child1DnaId, - Child2DnaId = profile.Child2DnaId, - Child3DnaId = profile.Child3DnaId, - Child4DnaId = profile.Child4DnaId, - }; - - await _userTimeStampRepository.AddAsync(checkin); - await _processUserTimeStampRepository.AddAsync(checkin_process); - } - else - { - var checkout = await _userTimeStampRepository.GetByIdAsync(data.CheckInId.Value); - //var currentCheckIn = await _userTimeStampRepository.GetTimestampByDateAsync(userId, currentDate); - - if (checkout == null) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่พบข้อมูลการลงเวลาทำงาน"); - await _notificationService.SendNotificationAsync(data.Token,true, $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่พบข้อมูลการลงเวลาทำงาน\r\nกรุณาลองใหม่อีกครั้ง"); - - // send notification to user - var noti1 = new Notification - { - Body = $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากไม่พบข้อมูลการลงเวลาทำงาน", - ReceiverUserId = profile.Id, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti1); - await _appDbContext.SaveChangesAsync(); - - return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound); - } - - var currentCheckInProcess = await _processUserTimeStampRepository.GetTimestampByDateAsync(userId, checkout.CheckIn.Date); - - if (currentCheckInProcess == null) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่พบข้อมูลการประมวลผลเวลาทำงาน (CheckIn)"); - await _notificationService.SendNotificationAsync(data.Token, true, $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่พบข้อมูลการประมวลผลเวลาทำงาน (CheckIn)\r\nกรุณาลองใหม่อีกครั้ง"); - - // send notification to user - var noti1 = new Notification - { - Body = $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากไม่พบข้อมูลการประมวลผลเวลาทำงาน (CheckIn)", - ReceiverUserId = profile.Id, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti1); - await _appDbContext.SaveChangesAsync(); - - return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound); - } - - var checkout_process = await _processUserTimeStampRepository.GetByIdAsync(currentCheckInProcess.Id); - - // Update checkout record checkout.CheckOutLat = data.Lat; checkout.CheckOutLon = data.Lon; checkout.IsLocationCheckOut = data.IsLocation; @@ -1547,196 +922,44 @@ namespace BMA.EHR.Leave.Service.Controllers checkout.CheckOut = currentDate; await _userTimeStampRepository.UpdateAsync(checkout); - - var endTime = ""; - var startTime = ""; - var endTimeMorning = ""; - if (!data.IsLocation && data.LocationName == "ไปประชุม / อบรม / สัมมนา") - { - startTime = "13:00"; - endTime = "14:30"; - endTimeMorning = "12:00"; - } - else if (!data.IsLocation && data.LocationName == "ปฏิบัติงานในจุดบริการด่วนมหานคร") - { - startTime = "13:00"; - endTime = "18:30"; - endTimeMorning = "12:00"; - } - else - { - endTime = duty.EndTimeAfternoon; - startTime = duty.StartTimeAfternoon; - endTimeMorning = duty.EndTimeMorning; - } - string checkOutStatus = "NORMAL"; - var leaveReq = await _leaveRequestRepository.GetLeavePeriodAsync(userId, currentDate.Date); - if (leaveReq != null) - { - var leaveRange = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - if (leaveRange == "AFTERNOON" || leaveRange == "ALL") - { - if (checkout.CheckIn.Date < currentDate.Date) - { - // ถ้า check-out เป็นวันถัดไป สถานะปกติเสมอ - checkOutStatus = "NORMAL"; - } - else - { - if(DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) < - DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {endTimeMorning}")) - checkOutStatus = "ABSENT"; - else - checkOutStatus = "NORMAL"; - } - - } - else - { - // fix issue : SIT ระบบบันทึกเวลาปฏิบัติงาน>>ลงเวลาเข้า-ออกงาน (กรณีลงเวลาออกอีกวัน) #921 - var currentDateTime = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")); - var dutyEndTimeAfternoon = DateTime.Parse($"{checkout.CheckIn.ToString("yyyy-MM-dd")} {endTime}"); - var dutyEndTimeMorning = DateTime.Parse($"{checkout.CheckIn.ToString("yyyy-MM-dd")} {endTimeMorning}"); - - - if(currentDateTime.Date > checkout.CheckIn.Date) - { - // ถ้า check-out เป็นวันถัดไป สถานะปกติเสมอ - checkOutStatus = "NORMAL"; - } - else - { - // ถ้า check-out เป็นวันเดียวกับ check-in - // ตรวจสอบเวลาว่าสิ้นสุดก่อนบ่ายหรือไม่ - if(currentDateTime < dutyEndTimeMorning) // ถ้าออกก่อนเวลาสิ้นสุดตอนเช้า ขาดราชการ - { - checkOutStatus = "ABSENT"; - } - else if(currentDateTime >= dutyEndTimeAfternoon) // ถ้าออกหลังเวลาสิ้นสุดตอนบ่าย ปกติ - { - checkOutStatus = "NORMAL"; - } - else - { - checkOutStatus = "ABSENT"; - } - } - // checkOutStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) < - // DateTime.Parse($"{checkout.CheckIn.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}") ? - // // "ABSENT" : - // checkout.CheckIn.Date < currentDate.Date ? "NORMAL" : - // DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) >= - // DateTime.Parse($"{checkout.CheckIn.ToString("yyyy-MM-dd")} {endTime}") ? - // "NORMAL" : - // "ABSENT" : - // DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) < - // DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {endTimeMorning}") ? - // "ABSENT" : - // "NORMAL"; - } - } - else - { - // fix issue : SIT ระบบบันทึกเวลาปฏิบัติงาน>>ลงเวลาเข้า-ออกงาน (กรณีลงเวลาออกอีกวัน) #921 - var currentDateTime = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")); - var dutyEndTimeAfternoon = DateTime.Parse($"{checkout.CheckIn.ToString("yyyy-MM-dd")} {endTime}"); - var dutyEndTimeMorning = DateTime.Parse($"{checkout.CheckIn.ToString("yyyy-MM-dd")} {endTimeMorning}"); - - - if(currentDateTime.Date > checkout.CheckIn.Date) - { - // ถ้า check-out เป็นวันถัดไป สถานะปกติเสมอ - checkOutStatus = "NORMAL"; - } - else - { - // ถ้า check-out เป็นวันเดียวกับ check-in - // ตรวจสอบเวลาว่าสิ้นสุดก่อนบ่ายหรือไม่ - if(currentDateTime < dutyEndTimeMorning) // ถ้าออกก่อนเวลาสิ้นสุดตอนเช้า ขาดราชการ - { - checkOutStatus = "ABSENT"; - } - else if(currentDateTime >= dutyEndTimeAfternoon) // ถ้าออกหลังเวลาสิ้นสุดตอนบ่าย ปกติ - { - checkOutStatus = "NORMAL"; - } - else - { - checkOutStatus = "ABSENT"; - } - } - // checkOutStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) < - // DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}") ? - // // "ABSENT" : - // checkout.CheckIn.Date < currentDate.Date ? "NORMAL" : - // DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) >= - // DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {endTime}") ? - // "NORMAL" : - // "ABSENT" : - // DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) < - // DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {endTimeMorning}") ? - // "ABSENT" : - // "NORMAL"; - } - - if (checkout_process != null) - { - checkout_process.CheckOutLat = data.Lat; - checkout_process.CheckOutLon = data.Lon; - checkout_process.IsLocationCheckOut = data.IsLocation; - checkout_process.CheckOutLocationName = data.LocationName; - checkout_process.CheckOutPOI = data.POI; - checkout_process.CheckOutRemark = data.Remark; - checkout_process.CheckOutImageUrl = fileName; - checkout_process.CheckOut = currentDate; - checkout_process.CheckOutStatus = checkOutStatus; - - await _processUserTimeStampRepository.UpdateAsync(checkout_process); - } - else - { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, "ไม่พบข้อมูลการประมวลผลเวลาทำงาน"); - await _notificationService.SendNotificationAsync(data.Token,true, $"ลงเวลาไม่สำเร็จ \r\nเนื่องจากไม่พบข้อมูลการประมวลผลเวลาทำงาน\r\nกรุณาลองใหม่อีกครั้ง"); - // send notification to user - var noti1 = new Notification - { - Body = $"ประมวลผลการลงเวลาวันที่ {currentDate.ToString("dd-MM-yyyy")} ไม่สำเร็จ \r\nเนื่องจากไม่พบข้อมูลการประมวลผลเวลาทำงาน", - ReceiverUserId = profile.Id, - Type = "", - Payload = "", - }; - _appDbContext.Set().Add(noti1); - await _appDbContext.SaveChangesAsync(); - return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound); - } } - // อัปเดตสถานะเป็น COMPLETED - if (taskId != Guid.Empty) + else { - var additionalData = JsonConvert.SerializeObject(new - { - CheckInType = data.CheckInId == null ? "check-in" : "check-out", - FileName = fileName, - ProcessedDate = currentDate - }); - await _checkInJobStatusRepository.UpdateToCompletedAsync(taskId, additionalData); - await _notificationService.SendNotificationAsync(data.Token, false, - $"ลงเวลาสำเร็จ"); + return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound); + } + // fix issue : SIT ระบบบันทึกเวลาปฏิบัติงาน>>ลงเวลาเข้า-ออกงาน (กรณีลงเวลาออกอีกวัน) #921 + var checkOutStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) < + DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}") ? + // "ABSENT" : + checkout.CheckIn.Date < currentDate.Date ? "NORMAL" : + "ABSENT" : + DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) < + DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? + "ABSENT" : + "NORMAL"; + + if (checkout_process != null) + { + checkout_process.CheckOutLat = data.Lat; + checkout_process.CheckOutLon = data.Lon; + checkout_process.IsLocationCheckOut = data.IsLocation; + checkout_process.CheckOutLocationName = data.LocationName; + checkout_process.CheckOutPOI = data.POI; + checkout_process.CheckOutRemark = data.Remark; + checkout_process.CheckOutImageUrl = fileName; + checkout_process.CheckOut = currentDate; + checkout_process.CheckOutStatus = checkOutStatus; + + await _processUserTimeStampRepository.UpdateAsync(checkout_process); + } + else + { + return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound); } - var checkInType = data.CheckInId == null ? "check-in" : "check-out"; - return Success(new { user = $"{profile.FirstName} {profile.LastName}", date = currentDate, type = checkInType }); ; - } - catch (Exception ex) - { - // อัปเดตสถานะเป็น FAILED - if (taskId != Guid.Empty) - { - await _checkInJobStatusRepository.UpdateToFailedAsync(taskId, ex.Message); - await _notificationService.SendNotificationAsync(data.Token, true, ex.Message); - } - return Error(ex); } + var checkInType = data.CheckInId == null ? "check-in" : "check-out"; + return Success(new { user = $"{profile.FirstName} {profile.LastName}", date = currentDate, type = checkInType }); ; } /// @@ -1754,7 +977,7 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> CheckInOldAsync([FromForm] CheckTimeDto data) { var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); if (profile == null) return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); @@ -1919,7 +1142,7 @@ namespace BMA.EHR.Leave.Service.Controllers { var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); @@ -1942,10 +1165,7 @@ namespace BMA.EHR.Leave.Service.Controllers var checkout_base = DateTime.Parse($"{DateTime.Now.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}"); - // var test = await _processUserTimeStampRepository.GetTimeStampHistoryAsync(userId, year); - // return Success(test); - - var data = (await _processUserTimeStampRepository.GetTimeStampHistoryAsync2(userId, year)) + var data = (await _processUserTimeStampRepository.GetTimeStampHistoryAsync(userId, year)) .Select(d => new CheckInHistoryDto { CheckInId = d.Id, @@ -1959,7 +1179,7 @@ namespace BMA.EHR.Leave.Service.Controllers "LATE" : "NORMAL", CheckInIsLocation = d.IsLocationCheckIn, - CheckInLocationName = d.CheckInLocationName ?? "", + CheckInLocationName = d.CheckInLocationName, CheckOutDate = d.CheckOut == null ? null : d.CheckOut.Value.Date, CheckOutTime = d.CheckOut == null ? "" : d.CheckOut.Value.ToString("HH:mm:ss"), CheckOutLocation = d.CheckOutPOI ?? "", @@ -1974,7 +1194,7 @@ namespace BMA.EHR.Leave.Service.Controllers "NORMAL", CheckOutIsLocation = d.IsLocationCheckOut, - CheckOutLocationName = d.CheckOutLocationName ?? "", + CheckOutLocationName = d.CheckOutLocationName, IsEdit = _processUserTimeStampRepository.IsEditRequest(userId, d.CheckIn.Date) @@ -1988,9 +1208,7 @@ namespace BMA.EHR.Leave.Service.Controllers if (keyword != "") { - data = data.Where(x => (x.CheckInLocationName!.Contains(keyword) || x.CheckInLocation!.Contains(keyword) || - x.CheckOutLocationName!.Contains(keyword) || x.CheckOutLocation!.Contains(keyword))) - .ToList(); + data = data.Where(x => (x.CheckInLocation.Contains(keyword) || x.CheckOutLocation.Contains(keyword))).ToList(); } var pageData = data @@ -2013,7 +1231,7 @@ namespace BMA.EHR.Leave.Service.Controllers [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> LogRecordAsync([Required] DateTime startDate, [Required] DateTime endDate, int page = 1, int pageSize = 10, string keyword = "", string profileType = "ALL", string? sortBy = "", bool? descending = false) + public async Task> LogRecordAsync([Required] DateTime startDate, [Required] DateTime endDate, int page = 1, int pageSize = 10, string keyword = "", string profileType = "ALL") { var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_CHECKIN"); var jsonData = JsonConvert.DeserializeObject(getPermission); @@ -2031,55 +1249,16 @@ namespace BMA.EHR.Leave.Service.Controllers var imgUrl = $"{_configuration["MinIO:Endpoint"]}{_configuration["MinIO:BucketName"]}"; - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - //var data = (await _userTimeStampRepository.GetTimeStampHistoryForAdminAsync(startDate, endDate)) - var data = (await _userTimeStampRepository.GetTimeStampHistoryForAdminRoleAsync(startDate, endDate, role, nodeId, profileAdmin?.Node)) + var data = (await _userTimeStampRepository.GetTimeStampHistoryForAdminAsync(startDate, endDate)) .Select(d => new CheckInHistoryForAdminDto { Id = d.Id, //FullName = _userProfileRepository.GetUserFullName(d.KeycloakUserId, AccessToken), FullName = $"{d.Prefix ?? ""}{d.FirstName ?? ""} {d.LastName ?? ""}", - Prefix = d.Prefix ?? "", - FirstName = d.FirstName ?? "", - LastName = d.LastName ?? "", ProfileType = d.ProfileType ?? "", CheckInDate = d.CheckIn.Date, - CheckInTime = d.CheckIn.ToString("HH:mm"), + CheckInTime = d.CheckIn.ToString("HH:mm:ss"), CheckInLocation = d.CheckInPOI, CheckInLat = d.CheckInLat, CheckInLon = d.CheckInLon, @@ -2090,7 +1269,7 @@ namespace BMA.EHR.Leave.Service.Controllers CheckInLocationName = d.CheckInLocationName ?? "", CheckOutDate = d.CheckOut?.Date, - CheckOutTime = d.CheckOut == null ? "" : d.CheckOut.Value.ToString("HH:mm"), + CheckOutTime = d.CheckOut == null ? "" : d.CheckOut.Value.ToString("HH:mm:ss"), CheckOutLocation = d.CheckOut == null ? "" : d.CheckOutPOI, CheckOutLat = d.CheckOut == null ? null : d.CheckOutLat, CheckOutLon = d.CheckOut == null ? null : d.CheckOutLon, @@ -2110,61 +1289,6 @@ namespace BMA.EHR.Leave.Service.Controllers if (profileType.Trim().ToUpper() != "ALL") data = data.Where(x => x.ProfileType == profileType.Trim().ToUpper()).ToList(); - if (!string.IsNullOrWhiteSpace(sortBy)) - { - switch (sortBy.ToUpper()) - { - case "FULLNAME": - if (descending == true) - data = data.OrderByDescending(x => x.Prefix) - .ThenByDescending(x => x.FirstName) - .ThenByDescending(x => x.LastName) - .ToList(); - else - data = data.OrderBy(x => x.Prefix) - .ThenBy(x => x.FirstName) - .ThenBy(x => x.LastName) - .ToList(); - break; - case "CHECKINTIME": - if (descending == true) - data = data.OrderByDescending(x => x.CheckInTime).ToList(); - else - data = data.OrderBy(x => x.CheckInTime).ToList(); - break; - case "CHECKINLOCATION": - if (descending == true) - data = data.OrderByDescending(x => x.CheckInLocation) - .ThenByDescending(x => x.CheckInLat) - .ThenByDescending(x => x.CheckInLon) - .ToList(); - else - data = data.OrderBy(x => x.CheckInLocation) - .ThenBy(x => x.CheckInLat) - .ThenBy(x => x.CheckInLon) - .ToList(); - break; - case "CHECKOUTTIME": - if (descending == true) - data = data.OrderByDescending(x => x.CheckOutTime).ToList(); - else - data = data.OrderBy(x => x.CheckOutTime).ToList(); - break; - case "CHECKOUTLOCATION": - if (descending == true) - data = data.OrderByDescending(x => x.CheckOutLocation) - .ThenByDescending(x => x.CheckOutLat) - .ThenByDescending(x => x.CheckOutLon) - .ToList(); - else - data = data.OrderBy(x => x.CheckOutLocation) - .ThenBy(x => x.CheckOutLat) - .ThenBy(x => x.CheckOutLon) - .ToList(); - break; - default: break; - } - } var pageData = data .Skip((page - 1) * pageSize) .Take(pageSize) @@ -2208,7 +1332,7 @@ namespace BMA.EHR.Leave.Service.Controllers } else { - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(d.KeycloakUserId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(d.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); @@ -2241,8 +1365,7 @@ namespace BMA.EHR.Leave.Service.Controllers CheckInPOI = d.CheckInPOI, CheckInLat = d.CheckInLat, CheckInLon = d.CheckInLon, - //CheckInImg = $"{imgUrl}/{d.CheckInImageUrl}", - CheckInImg = await _minIOService.ImagesPathByName(d.CheckInImageUrl), + CheckInImg = $"{imgUrl}/{d.CheckInImageUrl}", CheckInStatus = d.CheckInStatus != null || d.CheckInStatus != "" ? d.CheckInStatus : DateTime.Parse(d.CheckIn.ToString("yyyy-MM-dd HH:mm")) > DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}") ? @@ -2262,7 +1385,7 @@ namespace BMA.EHR.Leave.Service.Controllers CheckOutPOI = d.CheckOut == null ? "" : d.CheckOutPOI, CheckOutLat = d.CheckOut == null ? null : d.CheckOutLat, CheckOutLon = d.CheckOut == null ? null : d.CheckOutLon, - CheckOutImg = d.CheckOut == null ? "" : await _minIOService.ImagesPathByName(d.CheckOutImageUrl), + CheckOutImg = d.CheckOut == null ? "" : $"{imgUrl}/{d.CheckOutImageUrl}", CheckOutStatus = d.CheckOut == null ? null : d.CheckOutStatus != null || d.CheckOutStatus != "" ? d.CheckOutStatus : @@ -2297,7 +1420,7 @@ namespace BMA.EHR.Leave.Service.Controllers [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(StatusCodes.Status500InternalServerError)] [AllowAnonymous] - public async Task> GetTimeRecordAsync([Required] DateTime startDate, [Required] DateTime endDate, int page = 1, int pageSize = 10, string status = "NORMAL", string keyword = "", string profileType = "ALL", string? sortBy = "", bool? descending = false) + public async Task> GetTimeRecordAsync([Required] DateTime startDate, [Required] DateTime endDate, int page = 1, int pageSize = 10, string status = "NORMAL", string keyword = "", string profileType = "ALL") { var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_CHECKIN"); var jsonData = JsonConvert.DeserializeObject(getPermission); @@ -2340,43 +1463,8 @@ namespace BMA.EHR.Leave.Service.Controllers //var count = await _processUserTimeStampRepository.GetTimeStampHistoryForAdminCountAsync(startDate, endDate); var imgUrl = $"{_configuration["MinIO:Endpoint"]}{_configuration["MinIO:BucketName"]}"; - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - //var resultData = await _processUserTimeStampRepository.GetTimeStampHistoryForAdminAsync(startDate, endDate); - var resultData = await _processUserTimeStampRepository.GetTimeStampHistoryForAdminRoleAsync(startDate, endDate, role, nodeId, profileAdmin?.Node); + var resultData = await _processUserTimeStampRepository.GetTimeStampHistoryForAdminAsync(startDate, endDate); var data = new List(); foreach (var d in resultData) @@ -2397,9 +1485,6 @@ namespace BMA.EHR.Leave.Service.Controllers { Id = d.Id, FullName = $"{d.Prefix ?? ""}{d.FirstName ?? ""} {d.LastName ?? ""}", - Prefix = d.Prefix ?? "", - FirstName = d.FirstName ?? "", - LastName = d.LastName ?? "", ProfileType = d.ProfileType ?? "", CheckInDate = d.CheckIn.Date, @@ -2499,61 +1584,6 @@ namespace BMA.EHR.Leave.Service.Controllers if (profileType.Trim().ToUpper() != "ALL") data = data.Where(x => x.ProfileType == profileType.Trim().ToUpper()).ToList(); - if (!string.IsNullOrWhiteSpace(sortBy)) - { - switch (sortBy.ToUpper()) - { - case "FULLNAME": - if (descending == true) - data = data.OrderByDescending(x => x.Prefix) - .ThenByDescending(x => x.FirstName) - .ThenByDescending(x => x.LastName) - .ToList(); - else - data = data.OrderBy(x => x.Prefix) - .ThenBy(x => x.FirstName) - .ThenBy(x => x.LastName) - .ToList(); - break; - case "CHECKINTIME": - if (descending == true) - data = data.OrderByDescending(x => x.CheckInTime).ToList(); - else - data = data.OrderBy(x => x.CheckInTime).ToList(); - break; - case "CHECKINLOCATION": - if (descending == true) - data = data.OrderByDescending(x => x.CheckInLocation) - .ThenByDescending(x => x.CheckInLat) - .ThenByDescending(x => x.CheckInLon) - .ToList(); - else - data = data.OrderBy(x => x.CheckInLocation) - .ThenBy(x => x.CheckInLat) - .ThenBy(x => x.CheckInLon) - .ToList(); - break; - case "CHECKOUTTIME": - if (descending == true) - data = data.OrderByDescending(x => x.CheckOutTime).ToList(); - else - data = data.OrderBy(x => x.CheckOutTime).ToList(); - break; - case "CHECKOUTLOCATION": - if (descending == true) - data = data.OrderByDescending(x => x.CheckOutLocation) - .ThenByDescending(x => x.CheckOutLat) - .ThenByDescending(x => x.CheckOutLon) - .ToList(); - else - data = data.OrderBy(x => x.CheckOutLocation) - .ThenBy(x => x.CheckOutLat) - .ThenBy(x => x.CheckOutLon) - .ToList(); - break; - default: break; - } - } var pageData = data .Skip((page - 1) * pageSize) .Take(pageSize) @@ -2586,77 +1616,23 @@ namespace BMA.EHR.Leave.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - var profile = await _userProfileRepository.SearchProfile(req.CitizenId, req.FirstName, req.LastName, AccessToken ?? "", req.Page, req.PageSize, role, nodeId, profileAdmin?.Node, req.SelectedNodeId == null ? null : req.SelectedNodeId.Value.ToString("D"), req.SelectedNode); + var profile = await _userProfileRepository.SearchProfile(req.CitizenId, req.FirstName, req.LastName, AccessToken ?? ""); + + var pagedProfile = profile.Skip((req.Page - 1) * req.PageSize).Take(req.PageSize).ToList(); - // Get default round once var getDefaultRound = await _dutyTimeRepository.GetDefaultAsync(); var resultSet = new List(); - // Create dictionaries to cache results and avoid duplicate queries - var effectiveDateCache = new Dictionary(); - var dutyTimeCache = new Dictionary(); - - foreach (var p in profile.Data) + foreach (var p in pagedProfile) { - // Use cache for effective date - if (!effectiveDateCache.ContainsKey(p.Id)) - { - effectiveDateCache[p.Id] = await _userDutyTimeRepository.GetLastEffectRound(p.Id); - } - var effectiveDate = effectiveDateCache[p.Id]; + var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id); var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; - - // Use cache for duty time - DutyTime? userRound = null; - if (roundId != Guid.Empty) - { - if (!dutyTimeCache.ContainsKey(roundId)) - { - dutyTimeCache[roundId] = await _dutyTimeRepository.GetByIdAsync(roundId); - } - userRound = dutyTimeCache[roundId]; - } + var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); var duty = userRound ?? getDefaultRound; - if (duty == null) continue; // Skip if no duty time found - var res = new SearchProfileResultDto { ProfileId = p.Id, @@ -2664,21 +1640,12 @@ namespace BMA.EHR.Leave.Service.Controllers FullName = $"{p.Prefix ?? ""}{p.FirstName ?? ""} {p.LastName ?? ""}", StartTimeMorning = duty.StartTimeMorning, LeaveTimeAfterNoon = duty.EndTimeAfternoon, - EffectiveDate = effectiveDate?.EffectiveDate?.Date, - Prefix = p.Prefix ?? "", - FirstName = p.FirstName ?? "", - LastName = p.LastName ?? "", - RootDnaId = p.RootDnaId, - Child1DnaId = p.Child1DnaId, - Child2DnaId = p.Child2DnaId, - Child3DnaId = p.Child3DnaId, - Child4DnaId = p.Child4DnaId - + EffectiveDate = effectiveDate == null ? null : effectiveDate.EffectiveDate.Value.Date }; resultSet.Add(res); } - return Success(new { data = resultSet, total = profile.Total }); + return Success(new { data = resultSet, total = profile.Count }); } /// @@ -2709,12 +1676,6 @@ namespace BMA.EHR.Leave.Service.Controllers var old = await _userDutyTimeRepository.GetExist(req.ProfileId, req.EffectiveDate); - var profile = await _userProfileRepository.GetProfileByProfileIdAsync(req.ProfileId, AccessToken); - if (profile == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - if (old != null) { return Error(new Exception("ไม่สามารถทำรายการได้ เนื่องจากมีการกำหนดรอบการทำงานในวันที่นี้ไว้แล้ว"), StatusCodes.Status400BadRequest); @@ -2726,12 +1687,6 @@ namespace BMA.EHR.Leave.Service.Controllers DutyTimeId = req.RoundId, EffectiveDate = req.EffectiveDate, Remark = req.Remark, - - RootDnaId = profile.RootDnaId, - Child1DnaId = profile.Child1DnaId, - Child2DnaId = profile.Child2DnaId, - Child3DnaId = profile.Child3DnaId, - Child4DnaId = profile.Child4DnaId, }; await _userDutyTimeRepository.AddAsync(data); @@ -2740,64 +1695,6 @@ namespace BMA.EHR.Leave.Service.Controllers } - [HttpPost("round/multiple")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CreateChangeRoundMultipleAsync([FromBody] List reqs) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_WORK_ROUND_EDIT"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var currentDate = DateTime.Now.Date; - - List dataList = new List(); - - foreach(var req in reqs) - { - // var profile = await _userProfileRepository.GetProfileByProfileIdAsync(req.ProfileId, AccessToken); - // if (profile == null) - // { - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - // } - - if (req.EffectiveDate.Date < currentDate) - { - continue; // move to next item if effective date is in the past, not return error - // return Error(new Exception($"กำหนดรอบลงเวลาของ {req.FirstName} {req.LastName} ผิดพลาด เนื่องจากวันที่มีผลต้องมากกว่าหรือเท่ากับวันที่ปัจจุบัน({currentDate.ToString("yyyy-MM-dd")})"), StatusCodes.Status400BadRequest); - } - - var old = await _userDutyTimeRepository.GetExist(req.ProfileId, req.EffectiveDate); - - if (old != null) - { - continue; // move to next item if already exist, not return error - //return Error(new Exception($"กำหนดรอบลงเวลาของ {req.FirstName} {req.LastName} ผิดพลาด เนื่องจากมีการกำหนดรอบการทำงานในวันที่นี้ไว้แล้ว"), StatusCodes.Status400BadRequest); - } - - var data = new UserDutyTime - { - ProfileId = req.ProfileId, - DutyTimeId = req.RoundId, - EffectiveDate = req.EffectiveDate, - Remark = req.Remark, - - RootDnaId = req.RootDnaId, - Child1DnaId = req.Child1DnaId, - Child2DnaId = req.Child2DnaId, - Child3DnaId = req.Child3DnaId, - Child4DnaId = req.Child4DnaId, - }; - dataList.Add(data); - } - - await _userDutyTimeRepository.AddRangeAsync(dataList); - return Success(); - } - /// /// LV1_015 - ประวัติการเปลี่ยนรอบการลงเวลา (ADMIN) /// @@ -2810,7 +1707,7 @@ namespace BMA.EHR.Leave.Service.Controllers [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetChangeRoundHistoryByProfileIdAsync(Guid id, int page = 1, int pageSize = 10, string keyword = "", string? sortBy = "", bool? descending = false) + public async Task> GetChangeRoundHistoryByProfileIdAsync(Guid id, int page = 1, int pageSize = 10, string keyword = "") { var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "SYS_WORK_ROUND_EDIT"); if (getWorkflow == false) @@ -2831,7 +1728,7 @@ namespace BMA.EHR.Leave.Service.Controllers resultSet = data .GroupBy(item => item.ProfileId) .SelectMany(group => group - //.OrderBy(item => item.EffectiveDate) // เรียงลำดับตาม property ที่คุณต้องการ + .OrderBy(item => item.EffectiveDate) // เรียงลำดับตาม property ที่คุณต้องการ .Select((item, index) => new ChangeRoundHistoryDto { Round = index + 1, @@ -2840,303 +1737,16 @@ namespace BMA.EHR.Leave.Service.Controllers EffectiveDate = item.EffectiveDate.Value, Remark = item.Remark })) - //.Skip((page - 1) * pageSize) - //.Take(pageSize) + .Skip((page - 1) * pageSize) + .Take(pageSize) .ToList(); - if (!string.IsNullOrWhiteSpace(sortBy)) - { - switch (sortBy.ToUpper()) - { - case "ROUNT": - if (descending == true) - resultSet = resultSet.OrderByDescending(x => x.Round).ToList(); - else - resultSet = resultSet.OrderBy(x => x.Round).ToList(); - break; - case "STARTTIMEMORNIONG": - if (descending == true) - resultSet = resultSet.OrderByDescending(x => x.StartTimeMorning).ToList(); - else - resultSet = resultSet.OrderBy(x => x.StartTimeMorning).ToList(); - break; - case "EFFECTIVEDATE": - if (descending == true) - resultSet = resultSet.OrderByDescending(x => x.EffectiveDate).ToList(); - else - resultSet = resultSet.OrderBy(x => x.EffectiveDate).ToList(); - break; - case "REMARK": - if (descending == true) - resultSet = resultSet.OrderByDescending(x => x.Remark).ToList(); - else - resultSet = resultSet.OrderBy(x => x.Remark).ToList(); - break; - default: break; - } - } - resultSet = resultSet - .Skip((page - 1) * pageSize) - .Take(pageSize) - .ToList(); + } return Success(new { data = resultSet, total = data.Count }); } - #endregion - - #region " เปลี่ยนรอบการทำงาน ลจ. " - - /// - /// LV1_006 - เช็คเวลาต้องลงเวลาเข้าหรือออกงาน (USER) ลจ. - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("emp/search")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> SearchEmpProfileAsync([FromBody] DTOs.ChangeRound.SearchProfileDto req) - { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_WORK_ROUND_EDIT_EMP"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - var profile = await _userProfileRepository.SearchProfileEmployee(req.CitizenId, req.FirstName, req.LastName, AccessToken ?? "", req.Page, req.PageSize, role, nodeId, profileAdmin?.Node); - - // Get default round once - var getDefaultRound = await _dutyTimeRepository.GetDefaultAsync(); - - var resultSet = new List(); - - // Create dictionaries to cache results and avoid duplicate queries - var effectiveDateCache = new Dictionary(); - var dutyTimeCache = new Dictionary(); - - foreach (var p in profile.Data) - { - // Use cache for effective date - if (!effectiveDateCache.ContainsKey(p.Id)) - { - effectiveDateCache[p.Id] = await _userDutyTimeRepository.GetLastEffectRound(p.Id); - } - var effectiveDate = effectiveDateCache[p.Id]; - - var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; - - // Use cache for duty time - DutyTime? userRound = null; - if (roundId != Guid.Empty) - { - if (!dutyTimeCache.ContainsKey(roundId)) - { - dutyTimeCache[roundId] = await _dutyTimeRepository.GetByIdAsync(roundId); - } - userRound = dutyTimeCache[roundId]; - } - - var duty = userRound ?? getDefaultRound; - - if (duty == null) continue; // Skip if no duty time found - - var res = new SearchProfileResultDto - { - ProfileId = p.Id, - CitizenId = p.CitizenId ?? "", - FullName = $"{p.Prefix ?? ""}{p.FirstName ?? ""} {p.LastName ?? ""}", - StartTimeMorning = duty.StartTimeMorning, - LeaveTimeAfterNoon = duty.EndTimeAfternoon, - EffectiveDate = effectiveDate?.EffectiveDate?.Date - }; - resultSet.Add(res); - } - - return Success(new { data = resultSet, total = profile.Total }); - } - - /// - /// LV1_014 - เปลี่ยนรอบการลงเวลา (ADMIN) Employee - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("emp/round")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CreateChangeEmpRoundAsync([FromBody] CreateChangeRoundDto req) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_WORK_ROUND_EDIT"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var currentDate = DateTime.Now.Date; - if (req.EffectiveDate.Date < currentDate) - { - return Error(new Exception($"วันที่มีผลต้องมากกว่าหรือเท่ากับวันที่ปัจจุบัน({currentDate.ToString("yyyy-MM-dd")})"), StatusCodes.Status400BadRequest); - } - - var old = await _userDutyTimeRepository.GetExist(req.ProfileId, req.EffectiveDate); - - var profile = await _userProfileRepository.GetProfileByProfileIdAsync(req.ProfileId, AccessToken); - if (profile == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - if (old != null) - { - return Error(new Exception("ไม่สามารถทำรายการได้ เนื่องจากมีการกำหนดรอบการทำงานในวันที่นี้ไว้แล้ว"), StatusCodes.Status400BadRequest); - } - - var data = new UserDutyTime - { - ProfileId = req.ProfileId, - DutyTimeId = req.RoundId, - EffectiveDate = req.EffectiveDate, - Remark = req.Remark, - - RootDnaId = profile.RootDnaId, - Child1DnaId = profile.Child1DnaId, - Child2DnaId = profile.Child2DnaId, - Child3DnaId = profile.Child3DnaId, - Child4DnaId = profile.Child4DnaId, - }; - - await _userDutyTimeRepository.AddAsync(data); - - return Success(); - } - - /// - /// LV1_015 - ประวัติการเปลี่ยนรอบการลงเวลา (ADMIN) Employee - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("emp/round/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetChangeEmpRoundHistoryByProfileIdAsync(Guid id, int page = 1, int pageSize = 10, string keyword = "", string? sortBy = "", bool? descending = false) - { - var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "SYS_WORK_ROUND_EDIT"); - if (getWorkflow == false) - { - var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_WORK_ROUND_EDIT"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - } - var data = await _userDutyTimeRepository.GetListByProfileIdAsync(id); - - var resultSet = new List(); - - if (data != null) - { - resultSet = data - .GroupBy(item => item.ProfileId) - .SelectMany(group => group - //.OrderBy(item => item.EffectiveDate) // เรียงลำดับตาม property ที่คุณต้องการ - .Select((item, index) => new ChangeRoundHistoryDto - { - Round = index + 1, - StartTimeMorning = item.DutyTime.StartTimeMorning, - LeaveTimeAfternoon = item.DutyTime.EndTimeAfternoon, - EffectiveDate = item.EffectiveDate.Value, - Remark = item.Remark - })) - //.Skip((page - 1) * pageSize) - //.Take(pageSize) - .ToList(); - if (!string.IsNullOrWhiteSpace(sortBy)) - { - switch (sortBy.ToUpper()) - { - case "ROUNT": - if (descending == true) - resultSet = resultSet.OrderByDescending(x => x.Round).ToList(); - else - resultSet = resultSet.OrderBy(x => x.Round).ToList(); - break; - case "STARTTIMEMORNIONG": - if (descending == true) - resultSet = resultSet.OrderByDescending(x => x.StartTimeMorning).ToList(); - else - resultSet = resultSet.OrderBy(x => x.StartTimeMorning).ToList(); - break; - case "EFFECTIVEDATE": - if (descending == true) - resultSet = resultSet.OrderByDescending(x => x.EffectiveDate).ToList(); - else - resultSet = resultSet.OrderBy(x => x.EffectiveDate).ToList(); - break; - case "REMARK": - if (descending == true) - resultSet = resultSet.OrderByDescending(x => x.Remark).ToList(); - else - resultSet = resultSet.OrderBy(x => x.Remark).ToList(); - break; - default: break; - } - } - resultSet = resultSet - .Skip((page - 1) * pageSize) - .Take(pageSize) - .ToList(); - } - - return Success(new { data = resultSet, total = data.Count }); - } - #endregion #region " Check Checkout Time " @@ -3149,18 +1759,16 @@ namespace BMA.EHR.Leave.Service.Controllers /// เมื่อทำรายการสำเร็จ /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("user/checkout-check/{isSeminar}")] + [HttpGet("user/checkout-check")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CheckoutCheckAsync(string isSeminar = "N") + public async Task> CheckoutCheckAsync() { - // "S" = Seminar, "N" = Normal, "O" = One Stop Service - var time = DateTime.Now; var userId = UserId != null ? Guid.Parse(UserId) : Guid.Empty; - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); if (profile == null) { throw new Exception(GlobalMessages.DataNotFound); @@ -3188,71 +1796,16 @@ namespace BMA.EHR.Leave.Service.Controllers //var endTime = DateTimeOffset.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00").ToLocalTime().DateTime; - //var endTime = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00"); - var endTime = isSeminar.Trim().ToUpper() == "S" - ? DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} 14:30") - : isSeminar.Trim().ToUpper() == "O" - ? DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} 18:30") - : DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}"); + var endTime = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00"); - var endTimeMorning = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}"); - var endTimeDisplay = endTime; - - var status = string.Empty; - if(lastCheckIn == null) - { - status = "ABSENT"; - } - else if (lastCheckIn.CheckIn.Date < DateTime.Now.Date) - { - status = "NORMAL"; - } - else - { - if (time < endTime) - { - - //string checkOutStatus = "NORMAL"; - var leaveReq = await _leaveRequestRepository.GetLeavePeriodAsync(userId, time.Date); - if (leaveReq != null) - { - var leaveRange = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - if (leaveRange == "AFTERNOON" || leaveRange == "ALL") - { - if(time < endTimeMorning) - { - status = "ABSENT"; - endTimeDisplay = endTimeMorning; - } - else - { - status = "NORMAL"; - } - } - else - { - status = "ABSENT"; - } - } - else - { - status = "ABSENT"; - } - } - else - { - status = "NORMAL"; - } - } - - //var status = lastCheckIn == null ? "ABSENT" : lastCheckIn.CheckIn.Date < DateTime.Now.Date ? "NORMAL" : time < endTime ? "ABSENT" : "NORMAL"; + var status = lastCheckIn == null ? "ABSENT" : lastCheckIn.CheckIn.Date < DateTime.Now.Date ? "NORMAL" : time < endTime ? "ABSENT" : "NORMAL"; return Success(new { Status = status, StatusText = status == "ABSENT" ? "ขาดราชการ" : "ปกติ", ServerTime = time, - EndTime = endTimeDisplay + EndTime = endTime }); } @@ -3280,18 +1833,9 @@ namespace BMA.EHR.Leave.Service.Controllers { return Error("ไม่สามารถขอลงเวลากรณีพิเศษในวันที่มากกว่าวันที่ปัจจุบันได้", StatusCodes.Status400BadRequest); } - - var userId = UserId != null ? Guid.Parse(UserId) : Guid.Empty; - - var checkin = await _userTimeStampRepository.GetTimestampByDateAsync(userId, req.CheckDate.Date); - if (checkin != null && checkin.CheckOut == null) - { - return Error("ระบบพบรายการลงเวลาของวันที่ต้องการแก้ไข แต่ยังไม่มีข้อมูลการลงเวลาออก กรุณาลงเวลาออกให้เรียบร้อยก่อนดำเนินการ"); - } - - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); if (profile == null) { throw new Exception(GlobalMessages.DataNotFound); @@ -3307,18 +1851,6 @@ namespace BMA.EHR.Leave.Service.Controllers Prefix = profile.Prefix, FirstName = profile.FirstName, LastName = profile.LastName, - - // fix issue #1547 - POI = req.POI, - Latitude = req.Latitude, - Longitude = req.Longitude, - - // add all Dna Id - RootDnaId = profile.RootDnaId ?? Guid.Empty, - Child1DnaId = profile.Child1DnaId ?? Guid.Empty, - Child2DnaId = profile.Child2DnaId ?? Guid.Empty, - Child3DnaId = profile.Child3DnaId ?? Guid.Empty, - Child4DnaId = profile.Child4DnaId ?? Guid.Empty, }; await _additionalCheckRequestRepository.AddAsync(request); @@ -3338,130 +1870,16 @@ namespace BMA.EHR.Leave.Service.Controllers [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetAdditionalCheckRequestAsync([Required] DateTime startDate, [Required] DateTime endDate, [Required] int page = 1, [Required] int pageSize = 10, string keyword = "", string? sortBy = "", bool? descending = false,string? status = "") + public async Task> GetAdditionalCheckRequestAsync([Required] int year, [Required] int month, [Required] int page = 1, [Required] int pageSize = 10, string keyword = "") { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("LIST", "SYS_CHECKIN_SPECIAL"); - //var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData!.status != 200) + var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_CHECKIN_SPECIAL"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - //string role = jsonData["result"]?.ToString(); - string role = jsonData.result.privilege; - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - //var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequests(year, month); - var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequestsByAdminRole2(startDate, endDate, role, nodeId, profileAdmin?.Node, keyword,status); - - // ถ้ามีการรักษาการ - if (jsonData.result.isAct) - { - var posActs = jsonData.result.posMasterActs.Where(x => x.privilege != "EMPTY"); - foreach(var act in posActs) - { - var actRole = act.privilege; - string actNodeId = string.Empty; - int? actNode; - - if (actRole == "NORMAL" || actRole == "CHILD") - { - actNodeId = act.child4DnaId != null ? - act.child4DnaId.Value.ToString("D") : - act.child3DnaId != null ? - act.child3DnaId.Value.ToString("D") : - act.child2DnaId != null ? - act.child2DnaId.Value.ToString("D") : - act.child1DnaId != null ? - act.child1DnaId.Value.ToString("D") : - act.rootDnaId != null ? - act.rootDnaId.Value.ToString("D") : - ""; - actNode = act.child4DnaId != null ? - 4 : - act.child3DnaId != null ? - 3 : - act.child2DnaId != null ? - 2 : - act.child1DnaId != null ? - 1 : - act.rootDnaId != null ? - 0 : - null; - } - else if (actRole == "BROTHER") - { - actNodeId = act.child4DnaId != null ? - act.child3DnaId.Value.ToString("D") : - act.child3DnaId != null ? - act.child2DnaId.Value.ToString("D") : - act.child2DnaId != null ? - act.child1DnaId!.Value.ToString("D") : - act.child1DnaId != null ? - act.rootDnaId.Value.ToString("D") : - act.rootDnaId != null ? - act.rootDnaId.Value.ToString("D") : - ""; - actNode = act.child4DnaId != null ? - 4 : - act.child3DnaId != null ? - 3 : - act.child2DnaId != null ? - 2 : - act.child1DnaId != null ? - 1 : - act.rootDnaId != null ? - 0 : - null; - } - else if (actRole == "ROOT" /*|| role == "PARENT"*/) - { - actNodeId = act.rootDnaId!.Value.ToString("D"); - actNode = 0; - } - - var rawDataAct = await _additionalCheckRequestRepository.GetAdditionalCheckRequestsByAdminRole2(startDate, endDate, actRole, actNodeId, profileAdmin?.Node, keyword,status); - if (rawDataAct != null) - { - if (rawData != null) - rawData = rawData.Union(rawDataAct).DistinctBy(x => x.Id).ToList(); - else - rawData = rawDataAct; - } - } - } - var total = rawData.Count; + var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequests(year, month); var getDefaultRound = await _dutyTimeRepository.GetDefaultAsync(); if (getDefaultRound == null) @@ -3471,76 +1889,19 @@ namespace BMA.EHR.Leave.Service.Controllers var result = new List(); - - if (!string.IsNullOrWhiteSpace(sortBy)) + foreach (var data in rawData) { - switch (sortBy.ToUpper()) + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); + if (profile == null) { - case "FULLNAME": - if (descending == true) - rawData = rawData.OrderByDescending(x => x.Prefix) - .ThenByDescending(x => x.FirstName) - .ThenByDescending(x => x.LastName) - .ToList(); - else - rawData = rawData.OrderBy(x => x.Prefix) - .ThenBy(x => x.FirstName) - .ThenBy(x => x.LastName) - .ToList(); - break; - case "CREATEDAT": - if (descending == true) - rawData = rawData.OrderByDescending(x => x.CreatedAt).ToList(); - else - rawData = rawData.OrderBy(x => x.CreatedAt).ToList(); - break; - case "CHECKDATE": - if (descending == true) - rawData = rawData.OrderByDescending(x => x.CheckDate).ToList(); - else - rawData = rawData.OrderBy(x => x.CheckDate).ToList(); - break; - // case "STARTTIMEMORNING": - // if (descending == true) - // rawData = rawData.OrderByDescending(x => x.StartTimeMorning).ToList(); - // else - // result = result.OrderBy(x => x.StartTimeMorning).ToList(); - // break; - // case "STARTTIMEAFTERNOON": - // if (descending == true) - // result = result.OrderByDescending(x => x.StartTimeAfternoon).ToList(); - // else - // result = result.OrderBy(x => x.StartTimeAfternoon).ToList(); - // break; - case "DESCRIPTION": - if (descending == true) - rawData = rawData.OrderByDescending(x => x.Description).ToList(); - else - rawData = rawData.OrderBy(x => x.Description).ToList(); - break; - default: - rawData = rawData.OrderBy(x => - x.Status.Trim().ToLower() == "pending" ? 1 : - x.Status.Trim().ToLower() == "approve" ? 2 : 3).ToList(); - break; - } - } - - var rawDataPaged = rawData.Skip((page - 1) * pageSize).Take(pageSize) - .ToList(); - - foreach (var data in rawDataPaged) - { - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(data.KeycloakUserId, AccessToken); - UserDutyTime? effectiveDate = null; - if (profile != null) - { - effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profile.Id); - //return Error($"{data.Id} PF{data.FirstName} {data.LastName} : {GlobalMessages.DataNotFound}", StatusCodes.Status404NotFound); + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } //var userRound = await _dutyTimeRepository.GetByIdAsync(profile.DutyTimeId ?? Guid.Empty); + + var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profile.Id); var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); + var checkInData = await _userTimeStampRepository.GetTimestampByDateAsync(data.KeycloakUserId, data.CheckDate); var duty = userRound ?? getDefaultRound; @@ -3552,9 +1913,6 @@ namespace BMA.EHR.Leave.Service.Controllers { Id = data.Id, FullName = $"{data.Prefix}{data.FirstName} {data.LastName}", - Prefix = data.Prefix ?? "", - FirstName = data.FirstName ?? "", - LastName = data.LastName ?? "", //FullName = $"{profile.Prefix}{profile.FirstName} {profile.LastName}", CreatedAt = data.CreatedAt, CheckDate = data.CheckDate, @@ -3597,79 +1955,21 @@ namespace BMA.EHR.Leave.Service.Controllers StatusSort = data.Status.Trim().ToLower() == "pending" ? 1 : data.Status.Trim().ToLower() == "approve" ? 2 : 3, - - POI = data.POI, - Latitude = data.Latitude, - Longitude = data.Longitude, - }; result.Add(resObj); } - // if (keyword != "") - // { - // result = result.Where(x => x.FullName.Contains(keyword)).ToList(); - // } - // if (string.IsNullOrWhiteSpace(sortBy)) - // { - // sortBy = "default"; - // } - // if (!string.IsNullOrWhiteSpace(sortBy)) - // { - // switch (sortBy.ToUpper()) - // { - // case "FULLNAME": - // if (descending == true) - // result = result.OrderByDescending(x => x.Prefix) - // .ThenByDescending(x => x.FirstName) - // .ThenByDescending(x => x.LastName) - // .ToList(); - // else - // result = result.OrderBy(x => x.Prefix) - // .ThenBy(x => x.FirstName) - // .ThenBy(x => x.LastName) - // .ToList(); - // break; - // case "CREATEDAT": - // if (descending == true) - // result = result.OrderByDescending(x => x.CreatedAt).ToList(); - // else - // result = result.OrderBy(x => x.CreatedAt).ToList(); - // break; - // case "CHECKDATE": - // if (descending == true) - // result = result.OrderByDescending(x => x.CheckDate).ToList(); - // else - // result = result.OrderBy(x => x.CheckDate).ToList(); - // break; - // case "STARTTIMEMORNING": - // if (descending == true) - // result = result.OrderByDescending(x => x.StartTimeMorning).ToList(); - // else - // result = result.OrderBy(x => x.StartTimeMorning).ToList(); - // break; - // case "STARTTIMEAFTERNOON": - // if (descending == true) - // result = result.OrderByDescending(x => x.StartTimeAfternoon).ToList(); - // else - // result = result.OrderBy(x => x.StartTimeAfternoon).ToList(); - // break; - // case "DESCRIPTION": - // if (descending == true) - // result = result.OrderByDescending(x => x.Description).ToList(); - // else - // result = result.OrderBy(x => x.Description).ToList(); - // break; - // default: - // result = result.OrderBy(x => x.StatusSort).ToList(); - // break; - // } - // } - // var pageResult = result.Skip((page - 1) * pageSize).Take(pageSize) - // .ToList(); + if (keyword != "") + { + result = result.Where(x => x.FullName.Contains(keyword)).ToList(); + } - return Success(new { data = result, total = total }); + var pageResult = result.Skip((page - 1) * pageSize).Take(pageSize) + .OrderBy(x => x.StatusSort) + .ToList(); + + return Success(new { data = pageResult, total = result.Count }); } /// @@ -3710,7 +2010,7 @@ namespace BMA.EHR.Leave.Service.Controllers // change user timestamp var processTimeStamp = await _processUserTimeStampRepository.GetTimestampByDateAsync(requestData.KeycloakUserId, requestData.CheckDate.Date); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(requestData.KeycloakUserId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(requestData.KeycloakUserId, AccessToken); if (processTimeStamp == null) { @@ -3728,8 +2028,8 @@ namespace BMA.EHR.Leave.Service.Controllers CheckInLon = 0, CheckOutLat = 0, CheckOutLon = 0, - CheckInPOI = "", - CheckOutPOI = "", + CheckInPOI = "ลงเวลากรณีพิเศษ", + CheckOutPOI = "ลงเวลากรณีพิเศษ", CheckInStatus = req.CheckInStatus, CheckOutStatus = req.CheckOutStatus, @@ -3759,20 +2059,6 @@ namespace BMA.EHR.Leave.Service.Controllers processTimeStamp.EditStatus = "APPROVE"; processTimeStamp.EditReason = req.Reason; - if (requestData.CheckInEdit) - { - processTimeStamp.CheckInPOI = requestData.POI ?? ""; - processTimeStamp.CheckInLat = requestData.Latitude ?? 0; - processTimeStamp.CheckInLon = requestData.Longitude ?? 0; - } - - if (requestData.CheckOutEdit) - { - processTimeStamp.CheckOutPOI = requestData.POI ?? ""; - processTimeStamp.CheckOutLat = requestData.Latitude ?? 0; - processTimeStamp.CheckOutLon = requestData.Longitude ?? 0; - } - await _processUserTimeStampRepository.AddAsync(processTimeStamp); } else @@ -3781,28 +2067,20 @@ namespace BMA.EHR.Leave.Service.Controllers { processTimeStamp.CheckIn = DateTime.Parse($"{requestData.CheckDate.Date.ToString("yyyy-MM-dd")} {req.CheckInTime}"); processTimeStamp.CheckInRemark = req.Reason; - //processTimeStamp.CheckInLat = 0; - //processTimeStamp.CheckInLon = 0; - //processTimeStamp.CheckInPOI = "ลงเวลากรณีพิเศษ"; + processTimeStamp.CheckInLat = 0; + processTimeStamp.CheckInLon = 0; + processTimeStamp.CheckInPOI = "ลงเวลากรณีพิเศษ"; processTimeStamp.CheckInStatus = req.CheckInStatus; - - processTimeStamp.CheckInPOI = requestData.POI ?? ""; - processTimeStamp.CheckInLat = requestData.Latitude ?? 0; - processTimeStamp.CheckInLon = requestData.Longitude ?? 0; } if (requestData.CheckOutEdit) { processTimeStamp.CheckOut = DateTime.Parse($"{requestData.CheckDate.Date.ToString("yyyy-MM-dd")} {req.CheckOutTime}"); processTimeStamp.CheckOutRemark = req.Reason; - //processTimeStamp.CheckOutLat = 0; - //processTimeStamp.CheckOutLon = 0; - //processTimeStamp.CheckOutPOI = "ลงเวลากรณีพิเศษ"; + processTimeStamp.CheckOutLat = 0; + processTimeStamp.CheckOutLon = 0; + processTimeStamp.CheckOutPOI = "ลงเวลากรณีพิเศษ"; processTimeStamp.CheckOutStatus = req.CheckOutStatus; - - processTimeStamp.CheckOutPOI = requestData.POI ?? ""; - processTimeStamp.CheckOutLat = requestData.Latitude ?? 0; - processTimeStamp.CheckOutLon = requestData.Longitude ?? 0; } @@ -3818,148 +2096,6 @@ namespace BMA.EHR.Leave.Service.Controllers return Success(); } - - [HttpPut("admin/edit/approve-list")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> ApproveRequestListAsync([FromBody] List reqs) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_CHECKIN_SPECIAL"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - - foreach (var req in reqs) - { - if (req.Reason == null || req.Reason == string.Empty) - { - return Error("กรุณากรอกเหตุผล", StatusCodes.Status400BadRequest); - } - - var requestData = await _additionalCheckRequestRepository.GetByIdAsync(req.RecId); - if (requestData == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - requestData.Status = "APPROVE"; - requestData.Comment = req.Reason; - await _additionalCheckRequestRepository.UpdateAsync(requestData); - - // change user timestamp - var processTimeStamp = await _processUserTimeStampRepository.GetTimestampByDateAsync(requestData.KeycloakUserId, requestData.CheckDate.Date); - - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(requestData.KeycloakUserId, AccessToken); - - if (processTimeStamp == null) - { - processTimeStamp = new ProcessUserTimeStamp - { - KeycloakUserId = requestData.KeycloakUserId, - CheckIn = DateTime.Parse($"{requestData.CheckDate.Date.ToString("yyyy-MM-dd")} {req.CheckInTime}"), - CheckOut = DateTime.Parse($"{requestData.CheckDate.Date.ToString("yyyy-MM-dd")} {req.CheckOutTime}"), - CheckInRemark = req.Reason, - CheckOutRemark = req.Reason, - - CheckInLat = 0, - CheckInLon = 0, - CheckOutLat = 0, - CheckOutLon = 0, - CheckInPOI = "", - CheckOutPOI = "", - CheckInStatus = req.CheckInStatus, - CheckOutStatus = req.CheckOutStatus, - - Prefix = profile.Prefix, - FirstName = profile.FirstName, - LastName = profile.LastName, - - // Add ข้อมูลจาก profile - CitizenId = profile.CitizenId, - ProfileType = profile.ProfileType, - Root = profile.Root, - RootId = profile.RootId, - Child1 = profile.Child1, - Child1Id = profile.Child1Id, - Child2 = profile.Child2, - Child2Id = profile.Child2Id, - Child3 = profile.Child3, - Child3Id = profile.Child3Id, - Child4 = profile.Child4, - Child4Id = profile.Child4Id, - Gender = profile.Gender, - ProfileId = profile.Id, - - - }; - - processTimeStamp.EditStatus = "APPROVE"; - processTimeStamp.EditReason = req.Reason; - - if (requestData.CheckInEdit) - { - processTimeStamp.CheckInPOI = requestData.POI ?? ""; - processTimeStamp.CheckInLat = requestData.Latitude ?? 0; - processTimeStamp.CheckInLon = requestData.Longitude ?? 0; - } - - if (requestData.CheckOutEdit) - { - processTimeStamp.CheckOutPOI = requestData.POI ?? ""; - processTimeStamp.CheckOutLat = requestData.Latitude ?? 0; - processTimeStamp.CheckOutLon = requestData.Longitude ?? 0; - } - - await _processUserTimeStampRepository.AddAsync(processTimeStamp); - } - else - { - if (requestData.CheckInEdit) - { - processTimeStamp.CheckIn = DateTime.Parse($"{requestData.CheckDate.Date.ToString("yyyy-MM-dd")} {req.CheckInTime}"); - processTimeStamp.CheckInRemark = req.Reason; - //processTimeStamp.CheckInLat = 0; - //processTimeStamp.CheckInLon = 0; - //processTimeStamp.CheckInPOI = "ลงเวลากรณีพิเศษ"; - processTimeStamp.CheckInStatus = req.CheckInStatus; - - processTimeStamp.CheckInPOI = requestData.POI ?? ""; - processTimeStamp.CheckInLat = requestData.Latitude ?? 0; - processTimeStamp.CheckInLon = requestData.Longitude ?? 0; - } - - if (requestData.CheckOutEdit) - { - processTimeStamp.CheckOut = DateTime.Parse($"{requestData.CheckDate.Date.ToString("yyyy-MM-dd")} {req.CheckOutTime}"); - processTimeStamp.CheckOutRemark = req.Reason; - //processTimeStamp.CheckOutLat = 0; - //processTimeStamp.CheckOutLon = 0; - //processTimeStamp.CheckOutPOI = "ลงเวลากรณีพิเศษ"; - processTimeStamp.CheckOutStatus = req.CheckOutStatus; - - processTimeStamp.CheckOutPOI = requestData.POI ?? ""; - processTimeStamp.CheckOutLat = requestData.Latitude ?? 0; - processTimeStamp.CheckOutLon = requestData.Longitude ?? 0; - } - - - processTimeStamp.EditStatus = "APPROVE"; - processTimeStamp.EditReason = req.Reason; - - await _processUserTimeStampRepository.UpdateAsync(processTimeStamp); - } - - var recvId = new List { profile.Id }; - await _notificationRepository.PushNotificationsAsync(recvId.ToArray(), "ลงเวลากรณีพิเศษ", - "การขอลงเวลากรณีพิเศษของคุณได้รับการอนุมัติ", "", "", true, false); - } - return Success(); - } - - /// /// LV1_020 - ไม่อนุมัติลงเวลากรณีพิเศษ (ADMIN) /// @@ -4006,7 +2142,7 @@ namespace BMA.EHR.Leave.Service.Controllers requestData.Comment = req.Reason; await _additionalCheckRequestRepository.UpdateAsync(requestData); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(requestData.KeycloakUserId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(requestData.KeycloakUserId, AccessToken); var recvId = new List { profile.Id }; await _notificationRepository.PushNotificationsAsync(recvId.ToArray(), "ลงเวลากรณีพิเศษ", "การขอลงเวลากรณีพิเศษของคุณไม่ได้รับการอนุมัติ", "", "", true, false); @@ -4050,7 +2186,7 @@ namespace BMA.EHR.Leave.Service.Controllers } else { - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(d.KeycloakUserId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(d.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); @@ -4080,8 +2216,7 @@ namespace BMA.EHR.Leave.Service.Controllers CheckInPOI = d.CheckInPOI, CheckInLat = d.CheckInLat, CheckInLon = d.CheckInLon, - // CheckInImg = $"{imgUrl}/{d.CheckInImageUrl}", - CheckInImg = await _minIOService.ImagesPathByName(d.CheckInImageUrl), + CheckInImg = $"{imgUrl}/{d.CheckInImageUrl}", CheckInStatus = DateTime.Parse(d.CheckIn.ToString("yyyy-MM-dd HH:mm")) > DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}") ? @@ -4098,7 +2233,7 @@ namespace BMA.EHR.Leave.Service.Controllers CheckOutPOI = d.CheckOut == null ? "" : d.CheckOutPOI, CheckOutLat = d.CheckOut == null ? null : d.CheckOutLat, CheckOutLon = d.CheckOut == null ? null : d.CheckOutLon, - CheckOutImg = d.CheckOut == null ? "" : await _minIOService.ImagesPathByName(d.CheckOutImageUrl), + CheckOutImg = d.CheckOut == null ? "" : $"{imgUrl}/{d.CheckOutImageUrl}", CheckOutStatus = d.CheckOut == null ? null : DateTime.Parse(d.CheckOut.Value.ToString("yyyy-MM-dd HH:mm")) < @@ -4109,10 +2244,6 @@ namespace BMA.EHR.Leave.Service.Controllers "ABSENT" : "NORMAL", CheckOutDescription = d.CheckOutRemark ?? "", - IsLocationCheckIn = d.IsLocationCheckIn, - IsLocationCheckOut = d.IsLocationCheckOut, - CheckInLocationName = d.CheckInLocationName ?? "", - CheckOutLocationName = d.CheckOutLocationName ?? "" }; return Success(result); @@ -4148,7 +2279,7 @@ namespace BMA.EHR.Leave.Service.Controllers foreach (var data in rawData) { - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(data.KeycloakUserId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); @@ -4159,32 +2290,27 @@ namespace BMA.EHR.Leave.Service.Controllers var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); var checkInData = await _userTimeStampRepository.GetTimestampByDateAsync(data.KeycloakUserId, data.CheckDate); - //var checkInData = await _processUserTimeStampRepository.GetTimestampByDateAsync(data.KeycloakUserId, data.CheckDate); var duty = userRound ?? getDefaultRound; - DateTime? resultCheckInDate, resultCheckOutDate, resultCheckInDateAndTime, resultCheckOutDateAndTime; + DateTime? resultCheckInDate, resultCheckOutDate; string resultCheckInTime, resultCheckOutTime; - string resultCheckInLocation = "", resultCheckOutLocation = ""; if (data.CheckInEdit) { resultCheckInDate = data.CheckDate.Date; resultCheckInTime = duty.StartTimeMorning; - resultCheckInLocation = data.POI ?? ""; } else { resultCheckInDate = checkInData == null ? null : checkInData.CheckIn; resultCheckInTime = checkInData == null ? "00:00" : checkInData.CheckIn.ToString("HH:mm"); - resultCheckInLocation = checkInData == null ? "" : checkInData!.CheckInPOI; } if (data.CheckOutEdit) { resultCheckOutDate = data.CheckDate.Date; resultCheckOutTime = duty.EndTimeAfternoon; - resultCheckOutLocation = data.POI ?? ""; } else { @@ -4195,15 +2321,9 @@ namespace BMA.EHR.Leave.Service.Controllers resultCheckOutTime = checkInData == null ? "00:00" : checkInData.CheckOut == null ? "00:00" : checkInData.CheckOut.Value.ToString("HH:mm"); - resultCheckOutLocation = checkInData == null ? "" : checkInData!.CheckOutPOI; } - - resultCheckInDateAndTime = resultCheckInDate is null ? null : DateTime.Parse($"{resultCheckInDate.Value.Date.ToString("yyyy-MM-dd")} {resultCheckInTime}"); - resultCheckOutDateAndTime = resultCheckOutDate is null ? null : DateTime.Parse($"{resultCheckOutDate.Value.Date.ToString("yyyy-MM-dd")} {resultCheckOutTime}"); - - // create result object to return var resObj = new GetAdditionalCheckRequestHistoryDto { @@ -4215,30 +2335,27 @@ namespace BMA.EHR.Leave.Service.Controllers CheckInTime = resultCheckInTime, CheckOutTime = resultCheckOutTime, - CheckInStatus = resultCheckInDateAndTime == null ? null : - DateTime.Parse(resultCheckInDateAndTime.Value.ToString("yyyy-MM-dd HH:mm")) > - DateTime.Parse($"{resultCheckInDate.Value.Date.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}") ? - DateTime.Parse(resultCheckInDateAndTime.Value.ToString("yyyy-MM-dd HH:mm")) > - DateTime.Parse($"{resultCheckInDate.Value.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? + CheckInStatus = checkInData == null ? null : + DateTime.Parse(checkInData.CheckIn.ToString("yyyy-MM-dd HH:mm")) > + DateTime.Parse($"{checkInData.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}") ? + DateTime.Parse(checkInData.CheckIn.ToString("yyyy-MM-dd HH:mm")) > + DateTime.Parse($"{checkInData.CheckIn.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? "ABSENT" : "LATE" : "NORMAL", - CheckOutStatus = resultCheckInDateAndTime == null ? null : - resultCheckOutDateAndTime == null ? null : - DateTime.Parse(resultCheckOutDateAndTime.Value.ToString("yyyy-MM-dd HH:mm")) < - DateTime.Parse($"{resultCheckInDate.Value.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}") ? + CheckOutStatus = checkInData == null ? null : + checkInData.CheckOut == null ? null : + DateTime.Parse(checkInData.CheckOut.Value.ToString("yyyy-MM-dd HH:mm")) < + DateTime.Parse($"{checkInData.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}") ? "ABSENT" : - DateTime.Parse(resultCheckOutDateAndTime.Value.ToString("yyyy-MM-dd HH:mm")) < - DateTime.Parse($"{resultCheckInDate.Value.Date.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? + DateTime.Parse(checkInData.CheckOut.Value.ToString("yyyy-MM-dd HH:mm")) < + DateTime.Parse($"{checkInData.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? "ABSENT" : "NORMAL", - //CheckInLocation = checkInData == null ? "" : checkInData.CheckInPOI, - //CheckOutLocation = checkInData == null ? "" : checkInData.CheckOutPOI ?? "", - - CheckInLocation = resultCheckInLocation, - CheckOutLocation = resultCheckOutLocation, + CheckInLocation = checkInData == null ? "" : checkInData.CheckInPOI, + CheckOutLocation = checkInData == null ? "" : checkInData.CheckOutPOI ?? "", EditReason = data.Comment ?? "", EditStatus = data.Status, @@ -4248,7 +2365,10 @@ namespace BMA.EHR.Leave.Service.Controllers result.Add(resObj); } - + if (keyword != "") + { + result = result.Where(x => x.EditReason!.Contains(keyword)).ToList(); + } var pageResult = result.Skip((page - 1) * pageSize).Take(pageSize) .ToList(); @@ -4334,82 +2454,6 @@ namespace BMA.EHR.Leave.Service.Controllers #endregion - #region " ปฏิทินการทำงานของ ลจ. " - - /// - /// LV1_023 - แสดงปฏิทินวันทำงานรายคน (ADMIN) Employee - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("admin/emp/work/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetCalendarEmpByProfileAsync(Guid id) - { - var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "SYS_WORK_ROUND_EDIT"); - if (getWorkflow == false) - { - var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_WORK_ROUND_EDIT"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - } - var data = await _userCalendarRepository.GetExist(id); - if (data == null) - return Success(new { Work = "NORMAL" }); - else - return Success(new { Work = data.Calendar }); - } - - /// - /// LV1_024 - บันทึกแก้ไขปฏิทินวันทำงาน (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/emp/work/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> UpdateEmpCalendarByProfileAsync(Guid id, [FromBody] UpdateCalendarDto req) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_WORK_ROUND_EDIT"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var data = await _userCalendarRepository.GetExist(id); - if (data != null) - { - data.Calendar = req.Work; - await _userCalendarRepository.UpdateAsync(data); - return Success(); - } - else - { - data = new UserCalendar - { - ProfileId = id, - Calendar = req.Work - }; - - await _userCalendarRepository.AddAsync(data); - - return Success(); - } - } - - #endregion - #region " แก้ไขสถานะการลงเวลา " /// @@ -4435,62 +2479,7 @@ namespace BMA.EHR.Leave.Service.Controllers var data = await _processUserTimeStampRepository.GetByIdAsync(id); if (data == null) return Error(GlobalMessages.DataNotFound); - -  //if (data.CheckInStatus == "NORMAL" || data.CheckOutStatus == "NORMAL") - - //var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - // แก้เป็นมาใช้งาน KeycloakUserId แทน - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(data.KeycloakUserId, AccessToken); - var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); - if (defaultRound == null) - { - return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound); - } - var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profile!.Id); - var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; - var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); - var duty = userRound ?? defaultRound; - if (req.CheckInStatus == "NORMAL") - { - if(data.CheckInLocationName == "ไปประชุม / อบรม / สัมมนา") - { - data.CheckIn = DateTime.Parse($"{data.CheckIn.Date.ToString("yyyy-MM-dd")} 10:30"); - } - else if (data.CheckInLocationName == "ปฏิบัติงานในจุดบริการด่วนมหานคร") - { - data.CheckIn = DateTime.Parse($"{data.CheckIn.Date.ToString("yyyy-MM-dd")} 10:30"); - } - else - { - data.CheckIn = DateTime.Parse($"{data.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}"); - } - - } - if (req.CheckOutStatus == "NORMAL" ) - { - var checkOutTime = data.CheckOut != null ? data.CheckOut.Value : data.CheckIn; - var oldCheckOutTime = data.CheckOut != null ? data.CheckOut.Value : DateTime.Now; - var roundCheckOutTime = DateTime.Now; - if(data.CheckOutLocationName == "ไปประชุม / อบรม / สัมมนา") - { - roundCheckOutTime = DateTime.Parse($"{checkOutTime.Date.ToString("yyyy-MM-dd")} 14:30"); - } - else if (data.CheckInLocationName == "ปฏิบัติงานในจุดบริการด่วนมหานคร") - { - roundCheckOutTime = DateTime.Parse($"{checkOutTime.Date.ToString("yyyy-MM-dd")} 18:30"); - } - else - { - roundCheckOutTime = DateTime.Parse($"{checkOutTime.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}"); - } - - if (oldCheckOutTime < roundCheckOutTime) - { - data.CheckOut = roundCheckOutTime; - } - } - data.CheckInStatus = req.CheckInStatus; data.CheckOutStatus = req.CheckOutStatus; data.EditReason = req.Reason; @@ -4518,7 +2507,7 @@ namespace BMA.EHR.Leave.Service.Controllers [ProducesResponseType(StatusCodes.Status500InternalServerError)] public async Task> GetLeaveSummaryByProfileAsync(Guid id, [FromBody] GetLeaveSummaryDto req) { - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(id, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(id, AccessToken); var thisYear = DateTime.Now.Year; var startDate = req.StartDate; @@ -4567,182 +2556,6 @@ namespace BMA.EHR.Leave.Service.Controllers }); } - #endregion - - #region " Process - Leave and Absence " - - - /// - /// สร้าง Task สำหรับ Process ข้อมูลวันลาและขาดราชการ (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("admin/leave-task/process")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CreateProcessTaskAsync([FromBody] CreateLeaveProcessJobDto req) - { - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); - if (profile == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var task = new LeaveProcessJobStatus - { - RootDnaId = profile.RootDnaId ?? Guid.Empty, - CreatedUserId = profile.Keycloak?.ToString("D") ?? "", - CreatedFullName = profile.FirstName + " " + profile.LastName, - CreatedAt = DateTime.Now, - Status = "PENDING", - StartDate = req.StartDate, - EndDate = req.EndDate - }; - - await _leaveProcessJobStatusRepository.AddAsync(task); - - return Success(); - } - - /// - /// แสดงรายการ Task สำหรับ Process ข้อมูลวันลาและขาดราชการ (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("admin/leave-task/process")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetProcessTaskAsync() - { - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - - var tasks = await _leaveProcessJobStatusRepository.GetByUserIdAsync(userId); - - var result = tasks.Select(t => new - { - t.Id, - t.CreatedFullName, - t.CreatedAt, - t.Status, - t.StartDate, - t.EndDate, - t.ProcessingDate, - t.CompletedDate, - t.ErrorMessage - }); - - return Success(result); - } - - - /// - /// แสดงรายการ Task สำหรับ Process ข้อมูลวันลาและขาดราชการ (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("admin/leave-task/process/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetProcessTaskByIdAsync(Guid id) - { - var task = await _leaveProcessJobStatusRepository.GetByTaskIdAsync(id); - - if (task == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var result = new - { - task.Id, - task.CreatedFullName, - task.CreatedAt, - task.Status, - task.StartDate, - task.EndDate, - task.ProcessingDate, - task.CompletedDate, - task.ErrorMessage - }; - - return Success(result); - } - - /// - /// ลบ Task สำหรับ Process ข้อมูลวันลาและขาดราชการ (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/leave-task/process/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> DeleteProcessTaskByIdAsync(Guid id) - { - var task = await _leaveProcessJobStatusRepository.GetByTaskIdAsync(id); - - if (task == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - await _leaveProcessJobStatusRepository.DeleteAsync(task); - - return Success(); - } - - /// - /// อัปเดต Task สำหรับ Process ข้อมูลวันลาและขาดราชการ (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/leave-task/process/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> UpdateProcessTaskByIdAsync(Guid id,[FromBody] CreateLeaveProcessJobDto req) - { - var task = await _leaveProcessJobStatusRepository.GetByTaskIdAsync(id); - - if (task == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - if(task.Status != "PENDING") - { - return Error("ไม่สามารถแก้ไขได้เนื่องจาก Task อยู่ในสถานะกำลังดำเนินการหรือดำเนินการเสร็จสิ้นแล้ว"); - } - - task.StartDate = req.StartDate; - task.EndDate = req.EndDate; - - await _leaveProcessJobStatusRepository.UpdateAsync(task); - - return Success(); - } - - #endregion #endregion diff --git a/BMA.EHR.Leave/Controllers/LeaveReportController.cs b/BMA.EHR.Leave/Controllers/LeaveReportController.cs index 11458917..cf530522 100644 --- a/BMA.EHR.Leave/Controllers/LeaveReportController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveReportController.cs @@ -3,23 +3,21 @@ using BMA.EHR.Application.Repositories.Commands; using BMA.EHR.Application.Repositories.Leaves.LeaveRequests; using BMA.EHR.Application.Repositories.Leaves.TimeAttendants; using BMA.EHR.Application.Repositories.MetaData; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Models.Leave.Requests; -using BMA.EHR.Domain.Models.Leave.TimeAttendants; using BMA.EHR.Domain.Shared; using BMA.EHR.Leave.Service.DTOs.Reports; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Routing.Template; -using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using OfficeOpenXml; -using OfficeOpenXml.Style; +using Newtonsoft.Json; using Swashbuckle.AspNetCore.Annotations; using System.Globalization; using System.Security.Claims; +using BMA.EHR.Application.Responses.Profiles; +using Microsoft.OpenApi.Any; + namespace BMA.EHR.Leave.Service.Controllers { [Route("api/v{version:apiVersion}/leave/report")] @@ -44,8 +42,6 @@ namespace BMA.EHR.Leave.Service.Controllers private readonly UserCalendarRepository _userCalendarRepository; private readonly IHttpContextAccessor _httpContextAccessor; private readonly PermissionRepository _permission; - private readonly LeaveBeginningRepository _leaveBeginningRepository; - private readonly IWebHostEnvironment _hostingEnvironment; #endregion @@ -61,9 +57,7 @@ namespace BMA.EHR.Leave.Service.Controllers HolidayRepository holidayRepository, UserCalendarRepository userCalendarRepository, IHttpContextAccessor httpContextAccessor, - PermissionRepository permission, - LeaveBeginningRepository leaveBeginningRepository, - IWebHostEnvironment hostingEnvironment) + PermissionRepository permission) { _leaveRequestRepository = leaveRequestRepository; _userProfileRepository = userProfileRepository; @@ -76,19 +70,12 @@ namespace BMA.EHR.Leave.Service.Controllers _userCalendarRepository = userCalendarRepository; _httpContextAccessor = httpContextAccessor; _permission = permission; - _leaveBeginningRepository = leaveBeginningRepository; - _hostingEnvironment = hostingEnvironment; } private class LoopDate { public DateTime date { get; set; } public bool isHoliday { get; set; } - - public bool isWeekEnd { get; set; } - - public string dateRemark { get; set; } - } private class DateResultReport { @@ -138,47 +125,28 @@ namespace BMA.EHR.Leave.Service.Controllers private async Task GetReport01(LeaveRequest data) { - //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profile == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - var profile = await _userProfileRepository.GetProfileLeaveReportByKeycloakIdAsync(data.KeycloakUserId, AccessToken, "leave9"); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } var fullName = $"{profile!.Prefix}{profile!.FirstName} {profile!.LastName}"; - var lastLeaveRequest = - await _leaveRequestRepository.GetLastLeaveRequestByTypeForUserAsync2(data.KeycloakUserId, - data.Type.Id, data.CreatedAt); - - var fiscalYear = data.LeaveStartDate.Month >= 10 ? data.LeaveStartDate.Year + 1 : data.LeaveStartDate.Year; - var fiscalStart = new DateTime(fiscalYear - 1, 10, 1); - var fiscalEnd = new DateTime(fiscalYear, 9, 30); + await _leaveRequestRepository.GetLastLeaveRequestByTypeForUserAsync(data.KeycloakUserId, + data.Type.Id); - var startFiscalYear = (new DateTime(data.LeaveStartDate.Year - 1, 10, 1)).Date; - var endFiscalYear = (data.DateSendLeave ?? data.CreatedAt); - var sendLeaveDate = data.DateSendLeave ?? data.CreatedAt; + //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); + //var approver = string.Empty; + //if (rootOc != null) + //{ + // var list = await _commandRepository.GetOrgApproverAsync(rootOc ?? Guid.Empty); + // if (list.Count > 0) + // approver = list.First().Name; + //} - var thisYear = data.LeaveStartDate.Year; - var toDay = data.LeaveStartDate.Date; - if (toDay >= new DateTime(toDay.Year, 10, 1) && toDay <= new DateTime(toDay.Year, 12, 31)) - thisYear = thisYear + 1; - var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUser2Async(thisYear, data.Type.Id, data.KeycloakUserId); - var sumLeave = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUserBefore(data.KeycloakUserId, data.Type.Id, fiscalStart, fiscalEnd, sendLeaveDate); - if (leaveData != null) - { - sumLeave += leaveData.BeginningLeaveDays; - } - - var Oc = profile.isCommission == false - ? profile.Oc.ToThaiNumber() - : profile.Oc.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber(); - var approveResult = await GetApproverData(data.Approvers); + var sumLeave = await _leaveRequestRepository.GetSumApproveLeaveByTypeForUserAsync(data.KeycloakUserId, data.Type.Id, data.LeaveStartDate.Year); return new { @@ -186,261 +154,33 @@ namespace BMA.EHR.Leave.Service.Controllers reportName = $"leave_form", data = new { - leaveWrote = data.LeaveWrote.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), + leaveWrote = data.LeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), leaveTypeName = data.Type.Name, - leaveSubTypeName = data.LeaveSubTypeName != null ? data.LeaveSubTypeName.ToThaiNumber() : "", - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), + dear = data.Dear, fullname = fullName, - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, - leaveDetail = data.LeaveDetail.ToThaiNumber(), - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - LeaveTotal = data.LeaveTotal.ToString().ToThaiNumber(), //data.LeaveStartDate.DiffDay(data.LeaveEndDate).ToString().ToThaiNumber(), - leaveAddress = data.LeaveAddress.ToThaiNumber(), - leaveNumber = data.LeaveNumber.ToThaiNumber(), - LeaveLastStart = lastLeaveRequest == null ? "" : lastLeaveRequest.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - LeaveLastEnd = lastLeaveRequest == null ? "" : lastLeaveRequest.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - - LeaveLastTotal = lastLeaveRequest == null ? "0".ToThaiNumber() : lastLeaveRequest.LeaveTotal.ToString().ToThaiNumber(), + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile.Oc, + leaveDetail = data.LeaveDetail, + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), + LeaveTotal = data.LeaveStartDate.DiffDay(data.LeaveEndDate), + leaveAddress = data.LeaveAddress, + leaveNumber = data.LeaveNumber, + LeaveLastStart = lastLeaveRequest == null ? "" : lastLeaveRequest.LeaveStartDate.Date.ToThaiShortDate(), + LeaveLastEnd = lastLeaveRequest == null ? "" : lastLeaveRequest.LeaveEndDate.Date.ToThaiShortDate(), - LeaveSummary = sumLeave.ToString().ToThaiNumber(), - LeaveRemain = (data.Type.Limit - sumLeave).ToString().ToThaiNumber(), - LeaveAll = (data.LeaveTotal + sumLeave).ToString().ToThaiNumber(), + LeaveSummary = sumLeave, + LeaveRemain = data.Type.Limit - sumLeave, - Type1 = data.Type.Name == "ลาป่วย" ? "🗹" : "☐", - Type2 = data.Type.Name == "ลากิจส่วนตัว" ? "🗹" : "☐", - Type3 = data.Type.Name == "ลาคลอดบุตร" ? "🗹" : "☐", - - leaveS1 = data.Type.Name == "ลาป่วย" ? sumLeave.ToString().ToThaiNumber() : "", - leaveS2 = data.Type.Name == "ลากิจส่วนตัว" ? sumLeave.ToString().ToThaiNumber() : "", - leaveS3 = data.Type.Name == "ลาคลอดบุตร" ? sumLeave.ToString().ToThaiNumber() : "", - - leaveT1 = data.Type.Name == "ลาป่วย" ? data.LeaveTotal.ToString().ToThaiNumber() : "", - leaveT2 = data.Type.Name == "ลากิจส่วนตัว" ? data.LeaveTotal.ToString().ToThaiNumber() : "", - leaveT3 = data.Type.Name == "ลาคลอดบุตร" ? data.LeaveTotal.ToString().ToThaiNumber() : "", - - leaveA1 = data.Type.Name == "ลาป่วย" ? (data.LeaveTotal + sumLeave).ToString().ToThaiNumber() : "", - leaveA2 = data.Type.Name == "ลากิจส่วนตัว" ? (data.LeaveTotal + sumLeave).ToString().ToThaiNumber() : "", - leaveA3 = data.Type.Name == "ลาคลอดบุตร" ? (data.LeaveTotal + sumLeave).ToString().ToThaiNumber() : "", - approve = approveResult, - leaveStatus = data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" } }; } private async Task GetReport02(LeaveRequest data) { - //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profile == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - var profile = await _userProfileRepository.GetProfileLeaveReportByKeycloakIdAsync(data.KeycloakUserId, AccessToken, "leave10"); - if (profile == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var fullName = $"{profile!.Prefix}{profile!.FirstName} {profile!.LastName}"; - var Oc = profile.isCommission == false - ? profile.Oc.ToThaiNumber() - : profile.Oc.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber(); - var approveResult = await GetApproverData(data.Approvers); - return new - { - template = "leave10", - reportName = $"leave_form", - data = new - { - leaveWrote = data.LeaveWrote.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), - leaveTypeName = data.Type.Name, - leaveSubTypeName = data.LeaveSubTypeName != null ? data.LeaveSubTypeName.ToThaiNumber() : "", - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), - fullname = fullName, - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, - wifeDayName = data.WifeDayName ?? "", - wifeDayDateBorn = data.WifeDayDateBorn == null || data.WifeDayDateBorn == "" ? "" : DateTime.Parse(data.WifeDayDateBorn).ToThaiShortDate().ToThaiNumber(), - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - LeaveTotal = data.LeaveTotal.ToString().ToThaiNumber(), //data.LeaveStartDate.DiffDay(data.LeaveEndDate).ToString().ToThaiNumber(), - leaveAddress = data.LeaveAddress.ToThaiNumber(), - leaveNumber = data.LeaveNumber.ToThaiNumber(), - - approve = approveResult, - leaveStatus = data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" - } - }; - } - - private async Task GetReport03(LeaveRequest data) - { - //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profile == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - var profile = await _userProfileRepository.GetProfileLeaveReportByKeycloakIdAsync(data.KeycloakUserId, AccessToken, "leave11"); - if (profile == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - var fullName = $"{profile!.Prefix}{profile!.FirstName} {profile!.LastName}"; - - var startFiscalYear = new DateTime(data.LeaveStartDate.Year - 1, 10, 1); - var endFiscalYear = (data.DateSendLeave ?? data.CreatedAt); - - var fiscalYear = data.LeaveStartDate.Month >= 10 ? data.LeaveStartDate.Year + 1 : data.LeaveStartDate.Year; - var fiscalStart = new DateTime(fiscalYear - 1, 10, 1); - var fiscalEnd = new DateTime(fiscalYear, 9, 30); - - var thisYear = data.LeaveStartDate.Year; - var toDay = data.LeaveStartDate.Date; - if (toDay >= new DateTime(toDay.Year, 10, 1) && toDay <= new DateTime(toDay.Year, 12, 31)) - thisYear = thisYear + 1; - - var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUser2Async(fiscalYear, data.Type.Id, data.KeycloakUserId); - //var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUser2Async(thisYear, rawData.Type.Id, rawData.KeycloakUserId); - //var leaveSummary = leaveData == null ? 0.0 : leaveData.LeaveDaysUsed; - - //var sumLeave = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUser(data.KeycloakUserId, data.Type.Id, startFiscalYear, endFiscalYear); - - var sendLeaveDate = data.DateSendLeave ?? data.CreatedAt; - - var sumLeave = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUserBefore(data.KeycloakUserId, data.Type.Id, fiscalStart, fiscalEnd, sendLeaveDate); - if (leaveData != null) - { - sumLeave += leaveData.BeginningLeaveDays; - } - - //var sumLeave = leaveData == null ? 0.0 : leaveData.LeaveDaysUsed; - var leaveLimit = leaveData == null ? 0.0 : leaveData.LeaveDays; - var extendLeave = leaveLimit - 10; - var Oc = profile.isCommission == false - ? profile.Oc.ToThaiNumber() - : profile.Oc.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber(); - var approveResult = await GetApproverData(data.Approvers); - return new - { - template = "leave11", - reportName = $"leave_form", - data = new - { - leaveWrote = data.LeaveWrote.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), - leaveTypeName = data.Type.Name, - leaveSubTypeName = data.LeaveSubTypeName != null ? data.LeaveSubTypeName.ToThaiNumber() : "", - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), - fullname = fullName, - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, - - restDayOldTotal = extendLeave.ToString().ToThaiNumber(), - restDayCurrentTotal = (10).ToString().ToThaiNumber(), - - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - - leaveAddress = data.LeaveAddress.ToThaiNumber(), - leaveNumber = data.LeaveNumber.ToThaiNumber(), - LeaveRemain = (leaveLimit - sumLeave).ToString().ToThaiNumber(), - - leaveTotal = data.LeaveTotal.ToString().ToThaiNumber(), // วันลาปัจจุบัน - LeaveSummary = sumLeave.ToString().ToThaiNumber(), // วันลาครั้งก่อน - - LeaveAll = (data.LeaveTotal + sumLeave).ToString().ToThaiNumber(), // ลาครั้งนี้ + ครั้งก่อน - LeaveLimit = leaveLimit.ToString().ToThaiNumber(), // สิทธิ์การลา - - approve = approveResult, - leaveStatus = data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" - - } - }; - } - - private async Task GetReport04(LeaveRequest data, bool isHajj = false) - { - //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profile == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - var profile = await _userProfileRepository.GetProfileLeaveReportByKeycloakIdAsync(data.KeycloakUserId, AccessToken, isHajj ? "leave13": "leave12"); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); @@ -456,15 +196,105 @@ namespace BMA.EHR.Leave.Service.Controllers // if (list.Count > 0) // approver = list.First().Name; //} - if (data != null && data.LeaveSubTypeName == "ลาประกอบพิธีฮัจญ์" && isHajj == false) + + + + return new { - isHajj = true; + template = "leave10", + reportName = $"leave_form", + data = new + { + leaveWrote = data.LeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), + leaveTypeName = data.Type.Name, + dear = data.Dear, + fullname = fullName, + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile!.Oc ?? "", + wifeDayName = data.WifeDayName ?? "", + wifeDayDateBorn = data.WifeDayDateBorn ?? "", + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), + LeaveTotal = data.LeaveStartDate.DiffDay(data.LeaveEndDate), + leaveAddress = data.LeaveAddress, + leaveNumber = data.LeaveNumber, + } + }; + } + + private async Task GetReport03(LeaveRequest data) + { + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); + if (profile == null) + { + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } - var Oc = profile.isCommission == false - ? profile.Oc.ToThaiNumber() - : profile.Oc.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber(); - var approveResult = await GetApproverData(data.Approvers); - if (isHajj == true) + + var fullName = $"{profile!.Prefix}{profile!.FirstName} {profile!.LastName}"; + + //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); + //var approver = string.Empty; + //if (rootOc != null) + //{ + // var list = await _commandRepository.GetOrgApproverAsync(rootOc ?? Guid.Empty); + // if (list.Count > 0) + // approver = list.First().Name; + //} + + var sumLeave = await _leaveRequestRepository.GetSumApproveLeaveByTypeForUserAsync(data.KeycloakUserId, data.Type.Id, data.LeaveStartDate.Year); + + return new + { + template = "leave11", + reportName = $"leave_form", + data = new + { + leaveWrote = data.LeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), + leaveTypeName = data.Type.Name, + dear = data.Dear, + fullname = fullName, + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile!.Oc ?? "", + + restDayOldTotal = data.RestDayOldTotal, + restDayCurrentTotal = data.RestDayCurrentTotal, + + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), + LeaveTotal = data.LeaveStartDate.DiffDay(data.LeaveEndDate), + leaveAddress = data.LeaveAddress, + leaveNumber = data.LeaveNumber, + + LeaveSummary = sumLeave, + LeaveRemain = data.Type.Limit - sumLeave, + } + }; + } + + private async Task GetReport04(LeaveRequest data, bool isHajj = false) + { + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); + if (profile == null) + { + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + } + + var fullName = $"{profile!.Prefix}{profile!.FirstName} {profile!.LastName}"; + + //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); + //var approver = string.Empty; + //if (rootOc != null) + //{ + // var list = await _commandRepository.GetOrgApproverAsync(rootOc ?? Guid.Empty); + // if (list.Count > 0) + // approver = list.First().Name; + //} + + if (data.HajjDayStatus == true) { return new { @@ -472,49 +302,23 @@ namespace BMA.EHR.Leave.Service.Controllers reportName = $"leave_form", data = new { - leaveWrote = data.LeaveWrote.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), + leaveWrote = data.LeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), leaveTypeName = data.Type.Name, - leaveSubTypeName = data.LeaveSubTypeName != null ? data.LeaveSubTypeName.ToThaiNumber() : "", - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), + dear = data.Dear, fullname = fullName, - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile!.Oc ?? "", - leavegovernmentDate = data.LeaveGovernmentDate == null ? "" : data.LeaveGovernmentDate.Value.Date.ToThaiShortDate().ToThaiNumber(), + + leavegovernmentDate = data.LeaveGovernmentDate == null ? "" : data.LeaveGovernmentDate.Value.Date.ToThaiShortDate(), hajjDayStatus = data.HajjDayStatus, - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - LeaveTotal = data.LeaveTotal.ToString().ToThaiNumber(),//data.LeaveStartDate.DiffDay(data.LeaveEndDate).ToString().ToThaiNumber(), + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), + LeaveTotal = data.LeaveStartDate.DiffDay(data.LeaveEndDate), - hajjStatus = data.HajjDayStatus == true ? "☐ ยังไม่เคย 🗹 เคย" : "🗹 ยังไม่เคย ☐ เคย", - approve = approveResult, - leaveStatus = data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" } }; } @@ -526,56 +330,29 @@ namespace BMA.EHR.Leave.Service.Controllers reportName = $"leave_form", data = new { - leaveWrote = data.LeaveWrote.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), + leaveWrote = data.LeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), leaveTypeName = data.Type.Name, - leaveSubTypeName = data.LeaveSubTypeName != null ? data.LeaveSubTypeName.ToThaiNumber() : "", - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), + dear = data.Dear, fullname = fullName, - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile!.Oc ?? "", - leavebirthDate = data.LeaveBirthDate == null ? "" : data.LeaveBirthDate.Value.Date.ToThaiShortDate().ToThaiNumber(), - leavegovernmentDate = data.LeaveGovernmentDate == null ? "" : data.LeaveGovernmentDate.Value.Date.ToThaiShortDate().ToThaiNumber(), + leavebirthDate = data.LeaveBirthDate == null ? "" : data.LeaveBirthDate.Value.Date.ToThaiShortDate(), + leavegovernmentDate = data.LeaveGovernmentDate == null ? "" : data.LeaveGovernmentDate.Value.Date.ToThaiShortDate(), ordainDayStatus = data.OrdainDayStatus, - ordainDayLocationName = data.OrdainDayLocationName.ToThaiNumber(), - ordainDayLocationAddress = data.OrdainDayLocationAddress.ToThaiNumber(), - ordainDayLocationNumber = data.OrdainDayLocationNumber.ToThaiNumber(), - ordainDayOrdination = data.OrdainDayOrdination.ToThaiShortDate().ToThaiNumber(), - ordainDayBuddhistLentName = data.OrdainDayBuddhistLentName.ToThaiNumber(), - ordainDayBuddhistLentAddress = data.OrdainDayBuddhistLentAddress.ToThaiNumber(), + ordainDayLocationName = data.OrdainDayLocationName, + ordainDayLocationAddress = data.OrdainDayLocationAddress, + ordainDayLocationNumber = data.OrdainDayLocationNumber, + ordainDayOrdination = data.OrdainDayOrdination, + ordainDayBuddhistLentName = data.OrdainDayBuddhistLentName, + ordainDayBuddhistLentAddress = data.OrdainDayBuddhistLentAddress, - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - LeaveTotal = data.LeaveTotal.ToString().ToThaiNumber(),//data.LeaveStartDate.DiffDay(data.LeaveEndDate).ToString().ToThaiNumber(), + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), + LeaveTotal = data.LeaveStartDate.DiffDay(data.LeaveEndDate), - ordainStatus = data.OrdainDayStatus == true ? "☐ ยังไม่เคย 🗹 เคย" : "🗹 ยังไม่เคย ☐ เคย", - approve = approveResult, - leaveStatus = data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" } }; } @@ -583,16 +360,12 @@ namespace BMA.EHR.Leave.Service.Controllers private async Task GetReport05(LeaveRequest data) { - //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profile == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - var profile = await _userProfileRepository.GetProfileLeaveReportByKeycloakIdAsync(data.KeycloakUserId, AccessToken, "leave14"); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } + var fullName = $"{profile!.Prefix}{profile!.FirstName} {profile!.LastName}"; //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); @@ -603,77 +376,44 @@ namespace BMA.EHR.Leave.Service.Controllers // if (list.Count > 0) // approver = list.First().Name; //} - var Oc = profile.isCommission == false - ? profile.Oc.ToThaiNumber() - : profile.Oc.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber(); - var approveResult = await GetApproverData(data.Approvers); + return new { template = "leave14", reportName = $"leave_form", data = new { - leaveWrote = data.LeaveWrote.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), + leaveWrote = data.LeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), leaveTypeName = data.Type.Name, - leaveSubTypeName = data.LeaveSubTypeName != null ? data.LeaveSubTypeName.ToThaiNumber() : "", - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), + dear = data.Dear, fullname = fullName, - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile!.Oc ?? "", - absentDaySummon = data.AbsentDaySummon.ToThaiNumber(), - absentDayLocation = data.AbsentDayLocation.ToThaiNumber(), - absentDayRegistorDate = data.AbsentDayRegistorDate.Date.ToThaiShortDate().ToThaiNumber(), - absentDayGetIn = data.AbsentDayGetIn.ToThaiNumber(), - absentDayAt = data.AbsentDayAt.ToThaiNumber(), + absentDaySummon = data.AbsentDaySummon, + absentDayLocation = data.AbsentDayLocation, + absentDayRegistorDate = data.AbsentDayRegistorDate.Date.ToThaiShortDate(), + absentDayGetIn = data.AbsentDayGetIn, + absentDayAt = data.AbsentDayAt, - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - LeaveTotal = data.LeaveTotal.ToString().ToThaiNumber(), //data.LeaveStartDate.DiffDay(data.LeaveEndDate).ToString().ToThaiNumber(), + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), + LeaveTotal = data.LeaveStartDate.DiffDay(data.LeaveEndDate), - approve = approveResult, - leaveStatus = data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" } }; } private async Task GetReport06(LeaveRequest data) { - //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profile == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - var profile = await _userProfileRepository.GetProfileLeaveReportByKeycloakIdAsync(data.KeycloakUserId, AccessToken, "leave15"); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } + var fullName = $"{profile!.Prefix}{profile!.FirstName} {profile!.LastName}"; //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); @@ -684,99 +424,51 @@ namespace BMA.EHR.Leave.Service.Controllers // if (list.Count > 0) // approver = list.First().Name; //} - var Oc = profile.isCommission == false - ? profile.Oc.ToThaiNumber() - : profile.Oc.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber(); - var approveResult = await GetApproverData(data.Approvers); + return new { template = "leave15", reportName = $"leave_form", data = new { - leaveWrote = data.LeaveWrote.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), + leaveWrote = data.LeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), leaveTypeName = data.Type.Name, - leaveSubTypeName = data.LeaveSubTypeName != null ? data.LeaveSubTypeName.ToThaiNumber() : "", - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), + dear = data.Dear, fullname = fullName, - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile!.Oc ?? "", - leavebirthDate = data.LeaveBirthDate == null ? "" : data.LeaveBirthDate.Value.Date.ToThaiShortDate().ToThaiNumber(), - leavegovernmentDate = data.LeaveGovernmentDate == null ? "" : data.LeaveGovernmentDate.Value.Date.ToThaiShortDate().ToThaiNumber(), - leaveSalary = data.LeaveSalary == null ? "" : data.LeaveSalary.Value.ToNumericText().ToThaiNumber(), - leaveSalaryText = data.LeaveSalaryText.ToThaiNumber(), - studyDaySubject = data.StudyDaySubject.ToThaiNumber() ?? "", - studyDayDegreeLevel = data.StudyDayDegreeLevel.ToThaiNumber() ?? "", - studyDayUniversityName = data.StudyDayUniversityName.ToThaiNumber() ?? "", - studyDayCountry = data.StudyDayCountry.ToThaiNumber() ?? "", - studyDayScholarship = data.StudyDayScholarship.ToThaiNumber() ?? "", - studyDayTrainingSubject = data.StudyDayTrainingSubject.ToThaiNumber() ?? "", - studyDayTrainingName = data.StudyDayTrainingName.ToThaiNumber() ?? "", + leavebirthDate = data.LeaveBirthDate == null ? "" : data.LeaveBirthDate.Value.Date.ToThaiShortDate(), + leavegovernmentDate = data.LeaveGovernmentDate == null ? "" : data.LeaveGovernmentDate.Value.Date.ToThaiShortDate(), + leaveSalary = data.LeaveSalary, + leaveSalaryText = data.LeaveSalaryText, + studyDaySubject = data.StudyDaySubject ?? "", + studyDayDegreeLevel = data.StudyDayDegreeLevel ?? "", + studyDayUniversityName = data.StudyDayUniversityName ?? "", + studyDayCountry = data.StudyDayCountry ?? "", + studyDayScholarship = data.StudyDayScholarship ?? "", + studyDayTrainingSubject = data.StudyDayTrainingSubject ?? "", + studyDayTrainingName = data.StudyDayTrainingName ?? "", - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - LeaveTotal = data.LeaveTotal.ToString().ToThaiNumber(), //data.LeaveStartDate.DiffDay(data.LeaveEndDate).ToString().ToThaiNumber(), - leaveAddress = data.LeaveAddress.ToThaiNumber(), - leaveNumber = data.LeaveNumber.ToThaiNumber(), - - Type1 = data.LeaveSubTypeName == "ศึกษาต่อ" ? "🗹" : "☐", - Type2 = data.LeaveSubTypeName == "ฝึกอบรม" ? "🗹" : "☐", - Type3 = data.LeaveSubTypeName == "ปฎิบัติการวิจัย" ? "🗹" : "☐", - Type4 = data.LeaveSubTypeName == "ดูงาน" ? "🗹" : "☐", - country1 = data.LeaveSubTypeName == "ศึกษาต่อ" ? data.StudyDayCountry.ToThaiNumber() ?? "" : "", - country2 = data.LeaveSubTypeName != "ศึกษาต่อ" ? data.StudyDayCountry.ToThaiNumber() ?? "" : "", - scholarship1 = data.LeaveSubTypeName == "ศึกษาต่อ" ? data.StudyDayScholarship.ToThaiNumber() ?? "" : "☐", - scholarship2 = data.LeaveSubTypeName != "ศึกษาต่อ" ? data.StudyDayScholarship.ToThaiNumber() ?? "" : "☐", - approve = approveResult, - leaveStatus = data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), + LeaveTotal = data.LeaveStartDate.DiffDay(data.LeaveEndDate), + leaveAddress = data.LeaveAddress, + leaveNumber = data.LeaveNumber, } }; } private async Task GetReport07(LeaveRequest data) { - //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profile == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - - //var profileLeave = await _userProfileRepository.GetProfileLeaveByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profileLeave == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - var profile = await _userProfileRepository.GetProfileLeaveReportByKeycloakIdAsync(data.KeycloakUserId, AccessToken, "leave16"); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } + var fullName = $"{profile!.Prefix}{profile!.FirstName} {profile!.LastName}"; //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); @@ -787,98 +479,25 @@ namespace BMA.EHR.Leave.Service.Controllers // if (list.Count > 0) // approver = list.First().Name; //} - var Oc = profile.isCommission == false - ? profile.Oc.ToThaiNumber() - : profile.Oc.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber(); - var approveResult = await GetApproverData(data.Approvers); + return new { template = "leave16", reportName = $"leave_form", data = new { - leaveWrote = data.LeaveWrote.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), + leaveWrote = data.LeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), leaveTypeName = data.Type.Name, - leaveSubTypeName = data.LeaveSubTypeName != null ? data.LeaveSubTypeName.ToThaiNumber() : "", - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), + dear = data.Dear, fullname = fullName, fullnameEng = "", - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile!.Oc ?? "", - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - - profileType = profile.ProfileType, - - birthDate = profile.BirthDate.ToThaiShortDate().ToThaiNumber(), - retireDate = profile.RetireDate.ToThaiShortDate().ToThaiNumber(), - govAge = profile.GovAge.ToThaiNumber(), - age = profile.Age.ToThaiNumber(), - dateAppoint = profile.DateAppoint.ToThaiShortDate().ToThaiNumber(), - dateCurrent = profile.DateCurrent.ToThaiShortDate().ToThaiNumber(), - amount = ((double)profile.Amount).ToNumericText().ToThaiNumber(), - telephoneNumber = profile.TelephoneNumber == null ? "" : profile.TelephoneNumber.ToThaiNumber(), - - posLevel = profile.PosLevel.ToThaiNumber(), - posType = profile.PosType.ToThaiNumber(), - currentAddress = profile.CurrentAddress.ToThaiNumber(), - oc = profile.Oc.ToThaiNumber(), - root = profile.Root.ToThaiNumber(), - child1 = profile.Child1 == null ? "" : profile.Child1!.ToThaiNumber(), - child2 = profile.Child2 == null ? "" : profile.Child2!.ToThaiNumber(), - child3 = profile.Child3 == null ? "" : profile.Child3!.ToThaiNumber(), - child4 = profile.Child4 == null ? "" : profile.Child4!.ToThaiNumber(), - - positions = profile.Positions.Select(x => new - { - positionName = x.PositionName == null ? "" : x.PositionName.ToThaiNumber(), - dateStart = x.DateStart.ToThaiShortDate().ToThaiNumber(), - dateEnd = x.DateEnd.ToThaiShortDate().ToThaiNumber(), - positionType = x.PositionType == null ? "" : x.PositionType.ToThaiNumber(), - positionLevel = x.PositionLevel == null ? "" : x.PositionLevel.ToThaiNumber(), - orgRoot = x.OrgRoot == null ? "" : x.OrgRoot.ToThaiNumber(), - orgChild1 = x.OrgChild1 == null ? "" : x.OrgChild1.ToThaiNumber(), - orgChild2 = x.OrgChild2 == null ? "" : x.OrgChild2.ToThaiNumber(), - orgChild3 = x.OrgChild3 == null ? "" : x.OrgChild3.ToThaiNumber(), - orgChild4 = x.OrgChild4 == null ? "" : x.OrgChild4.ToThaiNumber(), - }).ToList(), - educations = profile.Educations.Select(x => new - { - educationLevel = x.EducationLevel == null ? "" : x.EducationLevel.ToThaiNumber(), - institute = x.Institute == null ? "" : x.Institute.ToThaiNumber(), - country = x.Country == null ? "" : x.Country.ToThaiNumber(), - finishDate = x.FinishDate == null ? "-" : x.FinishDate.Value.ToThaiShortDate().ToThaiNumber() - }).ToList(), - - //positionName = profileLeave.PositionName, - approve = approveResult, - leaveStatus = data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), } }; @@ -886,16 +505,12 @@ namespace BMA.EHR.Leave.Service.Controllers private async Task GetReport08(LeaveRequest data) { - //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profile == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - var profile = await _userProfileRepository.GetProfileLeaveReportByKeycloakIdAsync(data.KeycloakUserId, AccessToken, "leave17"); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } + var fullName = $"{profile!.Prefix}{profile!.FirstName} {profile!.LastName}"; //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); @@ -906,87 +521,46 @@ namespace BMA.EHR.Leave.Service.Controllers // if (list.Count > 0) // approver = list.First().Name; //} - var Oc = profile.isCommission == false - ? profile.Oc.ToThaiNumber() - : profile.Oc.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber(); - var approveResult = await GetApproverData(data.Approvers); + return new { template = "leave17", reportName = $"leave_form", data = new { - leaveWrote = data.LeaveWrote.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), + leaveWrote = data.LeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), leaveTypeName = data.Type.Name, - leaveSubTypeName = data.LeaveSubTypeName != null ? data.LeaveSubTypeName.ToThaiNumber() : "", - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), + dear = data.Dear, fullname = fullName, - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile!.Oc ?? "", - leaveSalary = data.LeaveSalary == null ? "" : data.LeaveSalary.Value.ToNumericText().ToThaiNumber(), - leaveSalaryText = data.LeaveSalaryText.ToThaiNumber(), - coupleDayName = data.CoupleDayName.ToThaiNumber(), - coupleDayLevel = data.CoupleDayLevel.ToThaiNumber(), - coupleDayPosition = data.CoupleDayPosition.ToThaiNumber(), + leaveSalary = data.LeaveSalary, + leaveSalaryText = data.LeaveSalaryText, + coupleDayName = data.CoupleDayName, + coupleDayLevel = data.CoupleDayLevel, + coupleDayPosition = data.CoupleDayPosition, coupleDayOrganizationName = "-", - coupleDayLevelCountry = data.CoupleDayLevelCountry.ToThaiNumber(), - coupleDayCountryHistory = data.CoupleDayCountryHistory == null ? "-" : data.CoupleDayCountryHistory!.ToThaiNumber() ?? "", - coupleDayTotalHistory = data.CoupleDayTotalHistory == null ? "-" : data.CoupleDayTotalHistory!.ToThaiNumber(), - coupleDayStartDateHistory = data.CoupleDayStartDateHistory == null ? "-" : data.CoupleDayStartDateHistory.Value.Date.ToThaiShortDate().ToThaiNumber(), - coupleDayEndDateHistory = data.CoupleDayEndDateHistory == null ? "-" : data.CoupleDayEndDateHistory.Value.Date.ToThaiShortDate().ToThaiNumber(), - coupleDaySumTotalHistory = data.CoupleDaySumTotalHistory == null ? "-" : data.CoupleDaySumTotalHistory!.ToThaiNumber(), + coupleDayLevelCountry = data.CoupleDayLevelCountry, + coupleDayCountryHistory = data.CoupleDayCountryHistory ?? "", + coupleDayTotalHistory = data.CoupleDayTotalHistory ?? "", + coupleDayStartDateHistory = data.CoupleDayStartDateHistory == null ? "" : data.CoupleDayStartDateHistory.Value.Date.ToThaiShortDate(), + coupleDayEndDateHistory = data.CoupleDayEndDateHistory == null ? "" : data.CoupleDayEndDateHistory.Value.Date.ToThaiShortDate(), + coupleDaySumTotalHistory = data.CoupleDaySumTotalHistory, - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - LeaveTotal = data.LeaveTotal.ToString().ToThaiNumber(), //data.LeaveStartDate.DiffDay(data.LeaveEndDate).ToString().ToThaiNumber(), - - approve = approveResult, - leaveStatus = data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), + LeaveTotal = data.LeaveStartDate.DiffDay(data.LeaveEndDate), } }; } private async Task GetReport09(LeaveRequest data) { - //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profile == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - - //var profileLeave = await _userProfileRepository.GetProfileLeaveByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profileLeave == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - var profile = await _userProfileRepository.GetProfileLeaveReportByKeycloakIdAsync(data.KeycloakUserId, AccessToken, "leave18"); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); @@ -1002,99 +576,27 @@ namespace BMA.EHR.Leave.Service.Controllers // if (list.Count > 0) // approver = list.First().Name; //} - var Oc = profile.isCommission == false - ? profile.Oc.ToThaiNumber() - : profile.Oc.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber(); - var approveResult = await GetApproverData(data.Approvers); + return new { template = "leave18", reportName = $"leave_form", data = new { - leaveWrote = data.LeaveWrote.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), + leaveWrote = data.LeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), leaveTypeName = data.Type.Name, - leaveSubTypeName = data.LeaveSubTypeName != null ? data.LeaveSubTypeName.ToThaiNumber() : "", - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), + dear = data.Dear, fullname = fullName, - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile!.Oc ?? "", - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - profileType = profile.ProfileType, - birthDate = profile.BirthDate.ToThaiShortDate().ToThaiNumber(), - retireDate = profile.RetireDate.ToThaiShortDate().ToThaiNumber(), - govAge = profile.GovAge.ToThaiNumber(), - age = profile.Age.ToThaiNumber(), - dateAppoint = profile.DateAppoint.ToThaiShortDate().ToThaiNumber(), - dateCurrent = profile.DateCurrent.ToThaiShortDate().ToThaiNumber(), - amount = ((double)profile.Amount).ToNumericText().ToThaiNumber(), - telephoneNumber = profile.TelephoneNumber == null ? "" : profile.TelephoneNumber.ToThaiNumber(), - posLevel = profile.PosLevel.ToThaiNumber(), - posType = profile.PosType.ToThaiNumber(), - currentAddress = profile.CurrentAddress.ToThaiNumber(), - oc = profile.Oc.ToThaiNumber(), - root = profile.Root.ToThaiNumber(), - child1 = profile.Child1 == null ? "" : profile.Child1!.ToThaiNumber(), - child2 = profile.Child2 == null ? "" : profile.Child2!.ToThaiNumber(), - child3 = profile.Child3 == null ? "" : profile.Child3!.ToThaiNumber(), - child4 = profile.Child4 == null ? "" : profile.Child4!.ToThaiNumber(), - - positions = profile.Positions.Select(x => new - { - positionName = x.PositionName == null ? "" : x.PositionName.ToThaiNumber(), - dateStart = x.DateStart.ToThaiShortDate().ToThaiNumber(), - dateEnd = x.DateEnd.ToThaiShortDate().ToThaiNumber(), - positionType = x.PositionType == null ? "" : x.PositionType.ToThaiNumber(), - positionLevel = x.PositionLevel == null ? "" : x.PositionLevel.ToThaiNumber(), - orgRoot = x.OrgRoot == null ? "" : x.OrgRoot.ToThaiNumber(), - orgChild1 = x.OrgChild1 == null ? "" : x.OrgChild1.ToThaiNumber(), - orgChild2 = x.OrgChild2 == null ? "" : x.OrgChild2.ToThaiNumber(), - orgChild3 = x.OrgChild3 == null ? "" : x.OrgChild3.ToThaiNumber(), - orgChild4 = x.OrgChild4 == null ? "" : x.OrgChild4.ToThaiNumber(), - }).ToList(), - - educations = profile.Educations.Select(x => new - { - educationLevel = x.EducationLevel == null ? "" : x.EducationLevel.ToThaiNumber(), - institute = x.Institute == null ? "" : x.Institute.ToThaiNumber(), - country = x.Country == null ? "" : x.Country.ToThaiNumber(), - finishDate = x.FinishDate == null ? "-" : x.FinishDate.Value.ToThaiShortDate().ToThaiNumber() - }).ToList(), - - Type1 = profile.ProfileType == "OFFICER" ? "🗹" : "☐", - Type2 = profile.ProfileType != "OFFICER" ? "🗹" : "☐", - approve = approveResult, - leaveStatus = data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveStatus != null && data.LeaveStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), } }; } @@ -1208,16 +710,12 @@ namespace BMA.EHR.Leave.Service.Controllers return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } - //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); - //if (profile == null) - //{ - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - //} - var profile = await _userProfileRepository.GetProfileLeaveReportByKeycloakIdAsync(data.KeycloakUserId, AccessToken, "leave9"); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(data.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } + var fullName = $"{profile!.Prefix}{profile!.FirstName} {profile!.LastName}"; //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); @@ -1228,65 +726,24 @@ namespace BMA.EHR.Leave.Service.Controllers // if (list.Count > 0) // approver = list.First().Name; //} - var Oc = profile.isCommission == false - ? profile.Oc.ToThaiNumber() - : profile.Oc.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber(); - var approveResult = await GetApproverData(data.Approvers); + var result = new { template = "แบบใบขอยกเลิกวันลา", reportName = $"leave_cancel_form", data = new { - leaveWrote = data.CancelLeaveWrote!.ToThaiNumber() ?? "", - dateSendLeave = data.DateSendLeave != null ? data.DateSendLeave.Value.Date.ToThaiShortDate().ToThaiNumber() : data.CreatedAt.Date.ToThaiShortDate().ToThaiNumber(), + leaveWrote = data.CancelLeaveWrote ?? "", + dateSendLeave = data.CreatedAt.Date.ToThaiShortDate(), leaveTypeName = data.Type.Name, fullname = fullName, - position = string.IsNullOrEmpty(profile.Position) ? "-" : profile.Position, - positionName = (!string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? string.IsNullOrEmpty(profile.PosExecutiveName) - ? string.IsNullOrEmpty(profile.Position) - ? "-" - : profile.Position - : profile.PosExecutiveName - : string.IsNullOrEmpty(profile.Position) - ? "-" - : string.IsNullOrEmpty(profile.PositionLeaveName) - ? profile.Position - : $"{profile.Position}{profile.PositionLeaveName}").ToThaiNumber(), - positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName.ToThaiNumber(), - posExecutiveName = profile.PosExecutiveName, - organizationName = profile!.Oc!.ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(profile.PositionLeaveName) && - (profile.PositionLeaveName.Contains("อำนวยการ") || profile.PositionLeaveName.Contains("บริหาร")) - ? new[] { Oc } - : !string.IsNullOrEmpty(profile.PosExecutiveName) - ? new[] { profile.PosExecutiveName.ToThaiNumber(), Oc } - : new[] { Oc }, - leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate().ToThaiNumber(), - leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate().ToThaiNumber(), - dear = data.CommanderPosition == null ? data.Dear : data.CommanderPosition.ToThaiNumber(), - leaveTotal = data.LeaveTotal.ToString().ToThaiNumber(), - profileType = data.ProfileType, - leaveReasonDelete = data.LeaveCancelComment == null ? "" : data.LeaveCancelComment!.ToThaiNumber(), - leaveDetail = data.LeaveDetail.ToThaiNumber(), - - Type1 = profile.ProfileType == "OFFICER" ? "🗹" : "☐", - Type2 = profile.ProfileType != "OFFICER" ? "🗹" : "☐", - Type3 = "☐", - approve = approveResult, - approverComment = !string.IsNullOrEmpty(data.LeaveDirectorComment) - ? data.LeaveDirectorComment.Replace("\r", "").Replace("\n", "").Trim().ToThaiNumber() - : "......................", - approverUpdatedAt = data.LastUpdatedAt.HasValue - ? data.LastUpdatedAt.Value.ToThaiShortDate().ToThaiNumber() - : "...... /...... /......", - leaveStatus = data.LeaveCancelStatus != null && data.LeaveCancelStatus!.ToUpper() == "APPROVE" - ? "🗹 อนุญาต ☐ ไม่อนุญาต" - : data.LeaveCancelStatus != null && data.LeaveCancelStatus!.ToUpper() == "REJECT" - ? "☐ อนุญาต 🗹 ไม่อนุญาต" - : "☐ อนุญาต ☐ ไม่อนุญาต" + positionName = profile!.Position == null ? "-" : profile!.Position, + positionLeaveName = profile!.PositionLeaveName == null ? "-" : profile!.PositionLeaveName, + organizationName = profile!.Oc ?? "", + leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(), + leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(), + dear = data.Dear, + leaveTotal = data.LeaveTotal } }; @@ -1323,48 +780,15 @@ namespace BMA.EHR.Leave.Service.Controllers return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } var profile = new List(); - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - if (type.Trim().ToUpper() == "OFFICER") { - profile = await _userProfileRepository.GetProfileByAdminRolev4(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date); + //profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficerAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId); + profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllOfficerAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId); } else { - profile = await _userProfileRepository.GetEmployeeByAdminRolev2(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date); + //profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployeeAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId); + profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllEmployeeAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId); } // get leave day var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByTypeAndRange(req.StartDate, req.EndDate); @@ -1372,343 +796,123 @@ namespace BMA.EHR.Leave.Service.Controllers var count = 1; var employees = new List(); - // กรองตามที่ fe ส่งมา - if ((role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "PARENT" || role == "BROTHER") /*&& req.node > profileAdmin?.Node*/) - { - profile = profile - .Where(x => req.node == 4 ? x.OrgChild4Id == req.nodeId : req.node == 3 ? x.OrgChild3Id == req.nodeId : req.node == 2 ? x.OrgChild2Id == req.nodeId : req.node == 1 ? x.OrgChild1Id == req.nodeId : req.node == 0 ? x.OrgRootId == req.nodeId : true) - .ToList(); - } - - var reportType = req!.Type!.Trim().ToUpper(); - var year = req.EndDate.Year; - var profileList = profile.Select(x => new ProfileData - { - Id = x.Id, - Prefix = x.Prefix ?? "", - FirstName = x.FirstName ?? "", - LastName = x.LastName ?? "", - DateStart = x.DateStart ?? x.DateAppoint, - DateAppoint = x.DateAppoint, - }).Distinct().ToList(); - - var beginningData = await _leaveBeginningRepository.GetAllByYearAsync(year); - - // sum all user - //var sickDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-001")?.Id ?? Guid.Empty, profileList!); - //var personalDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-002")?.Id ?? Guid.Empty, profileList!); - //var maternityDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-003")?.Id ?? Guid.Empty, profileList!); - //var wifeDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-004")?.Id ?? Guid.Empty, profileList!); - //var restDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-005")?.Id ?? Guid.Empty, profileList!); - //var ordainDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-006")?.Id ?? Guid.Empty, profileList!); - //var absentDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-007")?.Id ?? Guid.Empty, profileList!); - //var studyDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-008")?.Id ?? Guid.Empty, profileList!); - //var agencyDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-009")?.Id ?? Guid.Empty, profileList!); - //var coupleDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-010")?.Id ?? Guid.Empty, profileList!); - //var therapyDaySumALL = await _leaveBeginningRepository.GetAllByYearAndTypeAsync(year, leaveTypes.FirstOrDefault(x => x.Code == "LV-011")?.Id ?? Guid.Empty, profileList!); foreach (var p in profile) { var keycloakUserId = p.Keycloak ?? Guid.Empty; - if (reportType == "FULL") + var sickDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-001"); + var sickDayCount = sickDay != null ? sickDay.SumLeaveDay : 0; + + var personalDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-002"); + var personalDayCount = personalDay != null ? personalDay.SumLeaveDay : 0; + + var maternityDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-003"); + var maternityDayCount = maternityDay != null ? maternityDay.SumLeaveDay : 0; + + var wifeDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-004"); + var wifeDayCount = wifeDay != null ? wifeDay.SumLeaveDay : 0; + + var restDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-005"); + var restDayCount = restDay != null ? restDay.SumLeaveDay : 0; + + var ordainDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-006"); + var ordainDayCount = ordainDay != null ? ordainDay.SumLeaveDay : 0; + + var absentDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-007"); + var absentDayCount = absentDay != null ? absentDay.SumLeaveDay : 0; + + var studyDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-008"); + var studyDayCount = studyDay != null ? studyDay.SumLeaveDay : 0; + + var agencyDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-009"); + var agencyDayCount = agencyDay != null ? agencyDay.SumLeaveDay : 0; + + var coupleDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-010"); + var coupleDayCount = coupleDay != null ? coupleDay.SumLeaveDay : 0; + + var therapyDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-011"); + var therapyDayCount = therapyDay != null ? therapyDay.SumLeaveDay : 0; + + var timeStamps = await _processUserTimeStampRepository.GetTimeStampHistoryByRangeForUserAsync(p.Keycloak ?? Guid.Empty, req.StartDate, req.EndDate); + + var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); + if (defaultRound == null) { - - - var sickDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-001"); - var sickDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-001"); - var sickDayCount = sickDaySum != null ? sickDaySum.LeaveDaysUsed : 0; - var sickCount = sickDaySum != null ? sickDaySum.LeaveCount : 0; - - var personalDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-002"); - var personalDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-002"); - var personalDayCount = personalDaySum != null ? personalDaySum.LeaveDaysUsed : 0; - var personalCount = personalDaySum != null ? personalDaySum.LeaveCount : 0; - - var maternityDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-003"); - var maternityDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-003"); - var maternityDayCount = maternityDaySum != null ? maternityDaySum.LeaveDaysUsed : 0; - var maternityCount = maternityDaySum != null ? maternityDaySum.LeaveCount : 0; - - var wifeDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-004"); - var wifeDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-004"); - var wifeDayCount = wifeDaySum != null ? wifeDaySum.LeaveDaysUsed : 0; - var wifeCount = wifeDaySum != null ? wifeDaySum.LeaveCount : 0; - - var restDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-005"); - var restDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-005"); - var restDayCount = restDaySum != null ? restDaySum.LeaveDaysUsed : 0; - var restCount = restDaySum != null ? restDaySum.LeaveCount : 0; - - var ordainDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-006"); - var ordainDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-006"); - var ordainDayCount = ordainDaySum != null ? ordainDaySum.LeaveDaysUsed : 0; - var ordainCount = ordainDaySum != null ? ordainDaySum.LeaveCount : 0; - - var absentDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-007"); - var absentDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-007"); - var absentDayCount = absentDaySum != null ? absentDaySum.LeaveDaysUsed : 0; - var absentCount = absentDaySum != null ? absentDaySum.LeaveCount : 0; - - var studyDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-008"); - var studyDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-008"); - var studyDayCount = studyDaySum != null ? studyDaySum.LeaveDaysUsed : 0; - var studyCount = studyDaySum != null ? studyDaySum.LeaveCount : 0; - - var agencyDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-009"); - var agencyDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-009"); - var agencyDayCount = agencyDaySum != null ? agencyDaySum.LeaveDaysUsed : 0; - var agencyCount = agencyDaySum != null ? agencyDaySum.LeaveCount : 0; - - var coupleDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-010"); - var coupleDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-010"); - var coupleDayCount = coupleDaySum != null ? coupleDaySum.LeaveDaysUsed : 0; - var coupleCount = coupleDaySum != null ? coupleDaySum.LeaveCount : 0; - - var therapyDaySum = beginningData.FirstOrDefault(x => x.ProfileId == p.Id && x.LeaveType.Code == "LV-011"); - var therapyDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-011"); - var therapyDayCount = therapyDaySum != null ? therapyDaySum.LeaveDaysUsed : 0; - var therapyCount = therapyDaySum != null ? therapyDaySum.LeaveCount : 0; - - var timeStamps = await _processUserTimeStampRepository.GetTimeStampHistoryByRangeForUserAsync(p.Keycloak ?? Guid.Empty, req.StartDate, req.EndDate); - - var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); - if (defaultRound == null) - { - return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound); - } - //var userRound = await _dutyTimeRepository.GetByIdAsync(profile.DutyTimeId ?? Guid.Empty); - var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id); - var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; - var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); - - var duty = userRound ?? defaultRound; - - /* var processTimeStamps = timeStamps - .Select(d => new - { - d.Id, - CheckInStatus = DateTime.Parse(d.CheckIn.ToString("yyyy-MM-dd HH:mm")) > - DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}") ? - "LATE" : - "NORMAL", - CheckOutStatus = d.CheckOut == null ? "" : - DateTime.Parse(d.CheckOut.Value.ToString("yyyy-MM-dd HH:mm")) < - DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}") ? - "LATE" : - DateTime.Parse(d.CheckOut.Value.ToString("yyyy-MM-dd HH:mm")) < - DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? - "ABSENT" : - "NORMAL", - });*/ - - /*var absentCount = processTimeStamps.Count(x => x.CheckOutStatus == "ABSENT"); - var lateCount = processTimeStamps.Count(x => x.CheckInStatus == "LATE");*/ - - var absentCount1 = timeStamps.Count(d => - d.CheckOutStatus == "ABSENT" || d.CheckInStatus == "ABSENT"); // นับจำนวนที่มี CheckOutStatus == "ABSENT" - var lateCount1 = timeStamps.Count(d => - d.CheckInStatus == "LATE"); // นับจำนวนที่มี CheckInStatus == "LATE" - - - var emp = new - { - no = count, - fullName = $"{p.Prefix}{p.FirstName} {p.LastName}", - position = p.Position == null ? "" : p.Position, - positionLevel = p.PositionLevel == null ? "" : p.PositionLevel, - posNo = p.PosNo == null ? "" : p.PosNo, - reason = "", - sickDayCount = sickDayCount, - maternityDayCount = maternityDayCount, - wifeDayCount = wifeDayCount, - personalDayCount = personalDayCount, - restDayCount = restDayCount, - ordainDayCount = ordainDayCount, - absentDayCount = absentDayCount, - studyDayCount = studyDayCount, - agencyDayCount = agencyDayCount, - coupleDayCount = coupleDayCount, - therapyDayCount = therapyDayCount, - absentTotal = absentCount1, - lateTotal = lateCount1, - - sickCount = sickCount, - maternityCount = maternityCount, - wifeCount = wifeCount, - personalCount = personalCount, - restCount = restCount, - ordainCount = ordainCount, - absentCount = absentCount, - studyCount = studyCount, - agencyCount = agencyCount, - coupleCount = coupleCount, - therapyCount = therapyCount, - - // ระบบนับจำนวนครั้ง วันลาพักผ่อนด้วย ซึ่งตามระเบียบไม่ให้นับจำนวนครั้งวันลาพักผ่อนครับ จำนวนครั้งนับเฉพาะ ป่วย กับ กิจ - leaveTotal = sickCount + - personalCount - - // leaveTotal = sickCount + - // maternityCount + - // wifeCount + - // personalCount + - // restCount + - // ordainCount + - // absentCount + - // studyCount + - // agencyCount + - // coupleCount + - // therapyCount - }; - - - employees.Add(emp); - count++; + return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound); } - else + //var userRound = await _dutyTimeRepository.GetByIdAsync(profile.DutyTimeId ?? Guid.Empty); + var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id); + var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; + var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); + + var duty = userRound ?? defaultRound; + + /* var processTimeStamps = timeStamps + .Select(d => new + { + d.Id, + CheckInStatus = DateTime.Parse(d.CheckIn.ToString("yyyy-MM-dd HH:mm")) > + DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}") ? + "LATE" : + "NORMAL", + CheckOutStatus = d.CheckOut == null ? "" : + DateTime.Parse(d.CheckOut.Value.ToString("yyyy-MM-dd HH:mm")) < + DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}") ? + "LATE" : + DateTime.Parse(d.CheckOut.Value.ToString("yyyy-MM-dd HH:mm")) < + DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? + "ABSENT" : + "NORMAL", + });*/ + + /*var absentCount = processTimeStamps.Count(x => x.CheckOutStatus == "ABSENT"); + var lateCount = processTimeStamps.Count(x => x.CheckInStatus == "LATE");*/ + + var absentCount = timeStamps.Count(d => + d.CheckOutStatus == "ABSENT"); // นับจำนวนที่มี CheckOutStatus == "ABSENT" + var lateCount = timeStamps.Count(d => + d.CheckInStatus == "LATE"); // นับจำนวนที่มี CheckInStatus == "LATE" + + + var emp = new { - var sickDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-001"); - var sickDayCount = sickDay != null ? sickDay.SumLeaveDay : 0; - var sickCount = sickDay != null ? sickDay.CountLeaveDay : 0; + no = count, + fullName = $"{p.Prefix}{p.FirstName} {p.LastName}", + position = p.Position == null ? "" : p.Position, + positionLevel = p.PositionLevel == null ? "" : p.PositionLevel, + posNo = p.PosNo == null ? "" : p.PosNo, + reason = "", + sickDayCount = sickDayCount, + maternityDayCount = maternityDayCount, + wifeDayCount = wifeDayCount, + personalDayCount = personalDayCount, + restDayCount = restDayCount, + ordainDayCount = ordainDayCount, + absentDayCount = absentDayCount, + studyDayCount = studyDayCount, + agencyDayCount = agencyDayCount, + coupleDayCount = coupleDayCount, + therapyDayCount = therapyDayCount, + absentTotal = absentCount, + lateTotal = lateCount, + + leaveTotal = sickDayCount + + maternityDayCount + + wifeDayCount + + personalDayCount + + restDayCount + + ordainDayCount + + absentDayCount + + studyDayCount + + agencyDayCount + + coupleDayCount + + therapyDayCount + }; - var personalDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-002"); - var personalDayCount = personalDay != null ? personalDay.SumLeaveDay : 0; - var personalCount = personalDay != null ? personalDay.CountLeaveDay : 0; - - var maternityDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-003"); - var maternityDayCount = maternityDay != null ? maternityDay.SumLeaveDay : 0; - var maternityCount = maternityDay != null ? maternityDay.CountLeaveDay : 0; - - var wifeDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-004"); - var wifeDayCount = wifeDay != null ? wifeDay.SumLeaveDay : 0; - var wifeCount = wifeDay != null ? wifeDay.CountLeaveDay : 0; - - var restDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-005"); - var restDayCount = restDay != null ? restDay.SumLeaveDay : 0; - var restCount = restDay != null ? restDay.CountLeaveDay : 0; - - var ordainDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-006"); - var ordainDayCount = ordainDay != null ? ordainDay.SumLeaveDay : 0; - var ordainCount = ordainDay != null ? ordainDay.CountLeaveDay : 0; - - var absentDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-007"); - var absentDayCount = absentDay != null ? absentDay.SumLeaveDay : 0; - var absentCount = absentDay != null ? absentDay.CountLeaveDay : 0; - - var studyDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-008"); - var studyDayCount = studyDay != null ? studyDay.SumLeaveDay : 0; - var studyCount = studyDay != null ? studyDay.CountLeaveDay : 0; - - var agencyDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-009"); - var agencyDayCount = agencyDay != null ? agencyDay.SumLeaveDay : 0; - var agencyCount = agencyDay != null ? agencyDay.CountLeaveDay : 0; - - var coupleDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-010"); - var coupleDayCount = coupleDay != null ? coupleDay.SumLeaveDay : 0; - var coupleCount = coupleDay != null ? coupleDay.CountLeaveDay : 0; - - var therapyDay = leaveDays.FirstOrDefault(x => x.KeycloakUserId == keycloakUserId && x.LeaveTypeCode == "LV-011"); - var therapyDayCount = therapyDay != null ? therapyDay.SumLeaveDay : 0; - var therapyCount = therapyDay != null ? therapyDay.CountLeaveDay : 0; - - var timeStamps = await _processUserTimeStampRepository.GetTimeStampHistoryByRangeForUserAsync(p.Keycloak ?? Guid.Empty, req.StartDate, req.EndDate); - - var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); - if (defaultRound == null) - { - return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound); - } - //var userRound = await _dutyTimeRepository.GetByIdAsync(profile.DutyTimeId ?? Guid.Empty); - var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id); - var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; - var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); - - var duty = userRound ?? defaultRound; - - /* var processTimeStamps = timeStamps - .Select(d => new - { - d.Id, - CheckInStatus = DateTime.Parse(d.CheckIn.ToString("yyyy-MM-dd HH:mm")) > - DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}") ? - "LATE" : - "NORMAL", - CheckOutStatus = d.CheckOut == null ? "" : - DateTime.Parse(d.CheckOut.Value.ToString("yyyy-MM-dd HH:mm")) < - DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}") ? - "LATE" : - DateTime.Parse(d.CheckOut.Value.ToString("yyyy-MM-dd HH:mm")) < - DateTime.Parse($"{d.CheckIn.Date.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? - "ABSENT" : - "NORMAL", - });*/ - - /*var absentCount = processTimeStamps.Count(x => x.CheckOutStatus == "ABSENT"); - var lateCount = processTimeStamps.Count(x => x.CheckInStatus == "LATE");*/ - - var absentCount2 = timeStamps.Count(d => - d.CheckOutStatus == "ABSENT" || d.CheckInStatus == "ABSENT"); // นับจำนวนที่มี CheckOutStatus == "ABSENT" - var lateCount2 = timeStamps.Count(d => - d.CheckInStatus == "LATE"); // นับจำนวนที่มี CheckInStatus == "LATE" - - - var emp = new - { - no = count, - fullName = $"{p.Prefix}{p.FirstName} {p.LastName}", - position = p.Position == null ? "" : p.Position, - positionLevel = p.PositionLevel == null ? "" : p.PositionLevel, - posNo = p.PosNo == null ? "" : p.PosNo, - reason = "", - sickDayCount = sickDayCount, - maternityDayCount = maternityDayCount, - wifeDayCount = wifeDayCount, - personalDayCount = personalDayCount, - restDayCount = restDayCount, - ordainDayCount = ordainDayCount, - absentDayCount = absentDayCount, - studyDayCount = studyDayCount, - agencyDayCount = agencyDayCount, - coupleDayCount = coupleDayCount, - therapyDayCount = therapyDayCount, - absentTotal = absentCount2, - lateTotal = lateCount2, - - sickCount = sickCount, - maternityCount = maternityCount, - wifeCount = wifeCount, - personalCount = personalCount, - restCount = restCount, - ordainCount = ordainCount, - absentCount = absentCount, - studyCount = studyCount, - agencyCount = agencyCount, - coupleCount = coupleCount, - therapyCount = therapyCount, - - // ระบบนับจำนวนครั้ง วันลาพักผ่อนด้วย ซึ่งตามระเบียบไม่ให้นับจำนวนครั้งวันลาพักผ่อนครับ จำนวนครั้งนับเฉพาะ ป่วย กับ กิจ - leaveTotal = sickCount + - personalCount - - // leaveTotal = sickCount + - // maternityCount + - // wifeCount + - // personalCount + - // restCount + - // ordainCount + - // absentCount + - // studyCount + - // agencyCount + - // coupleCount + - // therapyCount - }; - - - employees.Add(emp); - count++; - } + employees.Add(emp); + count++; } var leaveTitleType = ""; @@ -1725,8 +929,6 @@ namespace BMA.EHR.Leave.Service.Controllers leaveTitleType = "หนึ่งเดือน"; } var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate().ToThaiNumber()}"; - var org = _userProfileRepository.GetOc(Guid.Parse(req.nodeId), req.node, AccessToken); - var organizationName = $"{(!string.IsNullOrEmpty(org.Child4) ? org.Child4 + "/" : "")}{(!string.IsNullOrEmpty(org.Child3) ? org.Child3 + "/" : "")}{(!string.IsNullOrEmpty(org.Child2) ? org.Child2 + "/" : "")}{(!string.IsNullOrEmpty(org.Child1) ? org.Child1 + "/" : "")}{org.Root ?? ""}"; var result = new { template = "LeaveYear-Officer", @@ -1734,8 +936,7 @@ namespace BMA.EHR.Leave.Service.Controllers data = new { dateTimeStamp = $"วันที่ {req.StartDate.Date.ToThaiShortDate().ToThaiNumber()}{enddate}", - //organizationName = profile?.FirstOrDefault()?.Oc ?? "", - organizationName = organizationName, + organizationName = profile?.FirstOrDefault()?.Oc ?? "", headerText = type.Trim().ToUpper() == "OFFICER" ? "ข้าราชการสามัญ" : "ลูกจ้างประจำ", leaveTitleType = leaveTitleType, employees = employees, @@ -1767,14 +968,14 @@ namespace BMA.EHR.Leave.Service.Controllers { try { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_SALARY_OFFICER"); + var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_LEAVE_REPORT"); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } var profile = new List(); - profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficerRetireFilterAndRevisionAndDate(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD" || jsonData["result"] == "BROTHER", req.isRetirement ?? true, req.revisionId, req.StartDate, req.EndDate); + profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficerRetireFilterAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.isRetirement ?? true, req.revisionId); // get leave day var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByTypeAndRange(req.StartDate, req.EndDate); @@ -1961,48 +1162,15 @@ namespace BMA.EHR.Leave.Service.Controllers return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } var profile = new List(); - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - if (type.Trim().ToUpper() == "OFFICER") { - profile = await _userProfileRepository.GetProfileByAdminRolev4(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date); + //profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD"); + profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD"); } else { - profile = await _userProfileRepository.GetEmployeeByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date); + //profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD"); + profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD"); } var date = req.StartDate.Date; @@ -2013,33 +1181,12 @@ namespace BMA.EHR.Leave.Service.Controllers var dateList = new List(); for (DateTime i = req.StartDate.Date; i <= req.EndDate.Date; i = i.AddDays(1)) { - //if (excludeDates.Contains(i)) - //{ - // dateList.Add(new LoopDate - // { - // date = i, - // isHoliday = true, - // }); - //} - if (holidays.Contains(i)) - { - var d = await _holidayRepository.GetHolidayAsync(i); - dateList.Add(new LoopDate - { - date = i, - isHoliday = true, - isWeekEnd = false, - dateRemark = d - }); - } - else if (weekend.Contains(i)) + if (excludeDates.Contains(i)) { dateList.Add(new LoopDate { date = i, isHoliday = true, - isWeekEnd = false, - dateRemark = "วันหยุด" }); } else @@ -2048,8 +1195,6 @@ namespace BMA.EHR.Leave.Service.Controllers { date = i, isHoliday = false, - isWeekEnd = false, - dateRemark = "" }); } } @@ -2064,18 +1209,6 @@ namespace BMA.EHR.Leave.Service.Controllers var studyTotal = 0; var workTotal = 0; var seminarTotal = 0; - // กรองตามที่ fe ส่งมา - if ((role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "PARENT" || role == "BROTHER") /*&& req.node > profileAdmin?.Node*/) - { - profile = profile - .Where(x => req.node == 4 ? x.OrgChild4Id == req.nodeId : req.node == 3 ? x.OrgChild3Id == req.nodeId : req.node == 2 ? x.OrgChild2Id == req.nodeId : req.node == 1 ? x.OrgChild1Id == req.nodeId : req.node == 0 ? x.OrgRootId == req.nodeId : true) - .ToList(); - } - var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); - if (defaultRound == null) - { - return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound); - } foreach (var dd in dateList) { foreach (var p in profile) @@ -2086,14 +1219,13 @@ namespace BMA.EHR.Leave.Service.Controllers var fullName = $"{p.Prefix}{p.FirstName} {p.LastName}"; // _userProfileRepository.GetUserFullName(keycloakUserId, AccessToken); - //var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); - //if (defaultRound == null) - //{ - // return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound); - //} + var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); + if (defaultRound == null) + { + return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound); + } - // ให้ใช้วันที่จาก loop date แทน - var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id, dd.date); + var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id); var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); @@ -2112,68 +1244,10 @@ namespace BMA.EHR.Leave.Service.Controllers case "LV-005": remarkStr += leaveReq.Type.Name; var leaveRange = leaveReq.LeaveRange == null ? "" : leaveReq.LeaveRange.ToUpper(); - - if(leaveReq.LeaveStartDate.Date == leaveReq.LeaveEndDate.Date) - { - if (leaveRange == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRange == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - - - // var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - // if (leaveRangeEnd == "MORNING") - // remarkStr += "ครึ่งวันเช้า"; - // else if (leaveRangeEnd == "AFTERNOON") - // remarkStr += "ครึ่งวันบ่าย"; - - var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - if (leaveRange != leaveRangeEnd) - { - if (leaveRangeEnd == "MORNING") - remarkStr += " - ครึ่งวันเช้า"; - else if (leaveRangeEnd == "AFTERNOON") - remarkStr += " - ครึ่งวันบ่าย"; - } - } - else - { - if(dd.date == leaveReq.LeaveStartDate.Date) - { - if (leaveRange == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRange == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - } - else if(dd.date == leaveReq.LeaveEndDate.Date) - { - var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - if (leaveRangeEnd == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRangeEnd == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - } - else - { - remarkStr += "เต็มวัน"; - } - } - - - // if (leaveRange == "MORNING") - // remarkStr += "ครึ่งวันเช้า"; - // else if (leaveRange == "AFTERNOON") - // remarkStr += "ครึ่งวันบ่าย"; - - - // var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - // if (leaveRange != leaveRangeEnd) - // { - // if (leaveRangeEnd == "MORNING") - // remarkStr += " - ครึ่งวันเช้า"; - // else if (leaveRangeEnd == "AFTERNOON") - // remarkStr += " - ครึ่งวันบ่าย"; - // } + if (leaveRange == "MORNING") + remarkStr += "ครึ่งวันเช้า"; + else if (leaveRange == "AFTERNOON") + remarkStr += "ครึ่งวันบ่าย"; break; default: remarkStr += leaveReq.Type.Name; @@ -2189,11 +1263,7 @@ namespace BMA.EHR.Leave.Service.Controllers remarkStr = "ขาดราชการ"; if (dd.isHoliday == true) { - remarkStr = $"วันหยุด ({dd.dateRemark})"; - } - else if (dd.isWeekEnd) - { - remarkStr = dd.dateRemark; + remarkStr = "วันหยุด"; } } else remarkStr = ""; @@ -2261,7 +1331,7 @@ namespace BMA.EHR.Leave.Service.Controllers { if (timeStamps.CheckInLocationName == "ปฏิบัติงานที่บ้าน") wfhTotal += 1; - else if (timeStamps.CheckInLocationName == "ไปประชุม / อบรม / สัมมนา") + else if (timeStamps.CheckInLocationName == "ไปประชุม/อบรม/สัมมนา/ปฏิบัติงานที่บ้านนอกสถานที่") seminarTotal += 1; } } @@ -2287,20 +1357,17 @@ namespace BMA.EHR.Leave.Service.Controllers count++; } } - employees = employees.OrderBy(x => x.checkInDate).ThenBy(x => x.checkInTimeRaw ?? DateTime.MaxValue).ThenBy(x => x.checkOutTimeRaw ?? DateTime.MaxValue).ToList(); + employees = employees.OrderBy(x => x.checkInTimeRaw ?? DateTime.MaxValue).ThenBy(x => x.checkOutTimeRaw ?? DateTime.MaxValue).ToList(); for (int i = 0; i < employees.Count; i++) { employees[i].no = i + 1; } var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate()}"; - var org = _userProfileRepository.GetOc(Guid.Parse(req.nodeId), req.node, AccessToken); - var organizationName = $"{(!string.IsNullOrEmpty(org.Child4) ? org.Child4 + "/" : "")}{(!string.IsNullOrEmpty(org.Child3) ? org.Child3 + "/" : "")}{(!string.IsNullOrEmpty(org.Child2) ? org.Child2 + "/" : "")}{(!string.IsNullOrEmpty(org.Child1) ? org.Child1 + "/" : "")}{org.Root ?? ""}"; var item = new { dateTimeStamp = $"ณ วัน{req.StartDate.Date.GetThaiDayOfWeek()} ที่ {req.StartDate.Date.ToThaiShortDate()}{enddate}", - //organizationName = profile?.FirstOrDefault()?.Oc ?? "", - organizationName = organizationName, + organizationName = profile?.FirstOrDefault()?.Oc ?? "", officerTotal = profile?.Count, workTotal = workTotal, restTotal = restTotal, @@ -2328,530 +1395,6 @@ namespace BMA.EHR.Leave.Service.Controllers } } - /// - /// LV2_037 - รายงานการเข้างานจำแนกรายวัน รายสัปดาห์ รายเดือน แยกรายหน่วยงาน/ส่วนราชการ - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("download/time-records/{type}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetTimeRecordsNewOfficerReport([FromBody] GetLeaveDetailByNodeReportDto req, string type) - { - try - { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_WORK_REPORT"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var profile = new List(); - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - if (type.Trim().ToUpper() == "OFFICER") - { - profile = await _userProfileRepository.GetProfileByAdminRolev4(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date); - } - else - { - profile = await _userProfileRepository.GetEmployeeByAdminRolev2(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date); - } - // Child กรองตามที่ fe ส่งมาอีกชั้น - if ((role == "ROOT" || role == "OWNER" || role == "CHILD" || role == "PARENT" || role == "BROTHER") /*&& req.node > profileAdmin?.Node*/) - { - profile = profile - .Where(x => req.node == 4 ? x.OrgChild4Id == req.nodeId : req.node == 3 ? x.OrgChild3Id == req.nodeId : req.node == 2 ? x.OrgChild2Id == req.nodeId : req.node == 1 ? x.OrgChild1Id == req.nodeId : req.node == 0 ? x.OrgRootId == req.nodeId : true) - .ToList(); - } - - var date = req.StartDate.Date; - - var holidays = await _holidayRepository.GetHolidayAsync(req.StartDate.Date, req.EndDate.Date); - var weekend = _holidayRepository.GetWeekEnd(req.StartDate.Date, req.EndDate.Date); - var excludeDates = holidays.Union(weekend).ToList(); - - var dateList = new List(); - for (DateTime i = req.StartDate.Date; i <= req.EndDate.Date; i = i.AddDays(1)) - { - - if (holidays.Contains(i)) - { - var d = await _holidayRepository.GetHolidayAsync(i); - dateList.Add(new LoopDate - { - date = i, - isHoliday = true, - isWeekEnd = false, - dateRemark = d - }); - } - else if (weekend.Contains(i)) - { - dateList.Add(new LoopDate - { - date = i, - isHoliday = true, - isWeekEnd = false, - dateRemark = "วันหยุด" - }); - } - else - { - dateList.Add(new LoopDate - { - date = i, - isHoliday = false, - isWeekEnd = false, - dateRemark = "" - }); - } - } - - var employees = new List(); - var count = 1; - - var restTotal = 0; - var sickTotal = 0; - var lateTotal = 0; - var wfhTotal = 0; - var studyTotal = 0; - var workTotal = 0; - var seminarTotal = 0; - - var wfaTotal = 0; //ปฏิบัติงานนอกสถานที่ - var outOfficeTotal = 0; //ขออนุญาติิิออกนอกสถานที่ - var oneStopSrvrTotal = 0; //จุดบริการด่วนมหานคร - var otherTotal = 0; //อื่นๆ - - - - - - var defaultRound = await _dutyTimeRepository.GetDefaultAsync(); - if (defaultRound == null) - { - return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound); - } - foreach (var dd in dateList) - { - foreach (var p in profile) - { - var keycloakUserId = p.Keycloak ?? Guid.Empty; - - var timeStamps = await _processUserTimeStampRepository.GetTimestampByDateAsync(keycloakUserId, dd.date); - - var fullName = $"{p.Prefix}{p.FirstName} {p.LastName}"; - - var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id, dd.date); - var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; - var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); - - var duty = userRound ?? defaultRound; - - // check วันลาของแต่ละคน - var leaveReq = await _leaveRequestRepository.GetLeavePeriodAsync(keycloakUserId, dd.date); - var remarkStr = string.Empty; - - if (leaveReq != null) - { - switch (leaveReq.Type.Code.ToUpper()) - { - case "LV-001": - case "LV-002": - case "LV-005": - remarkStr += leaveReq.Type.Name; - var leaveRange = leaveReq.LeaveRange == null ? "" : leaveReq.LeaveRange.ToUpper(); - if(leaveReq.LeaveStartDate.Date == leaveReq.LeaveEndDate.Date) - { - if (leaveRange == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRange == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - - - // var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - // if (leaveRangeEnd == "MORNING") - // remarkStr += "ครึ่งวันเช้า"; - // else if (leaveRangeEnd == "AFTERNOON") - // remarkStr += "ครึ่งวันบ่าย"; - - var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - if (leaveRange != leaveRangeEnd) - { - if (leaveRangeEnd == "MORNING") - remarkStr += " - ครึ่งวันเช้า"; - else if (leaveRangeEnd == "AFTERNOON") - remarkStr += " - ครึ่งวันบ่าย"; - } - } - else - { - if(dd.date == leaveReq.LeaveStartDate.Date) - { - if (leaveRange == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRange == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - } - else if(dd.date == leaveReq.LeaveEndDate.Date) - { - var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - if (leaveRangeEnd == "MORNING") - remarkStr += "ครึ่งวันเช้า"; - else if (leaveRangeEnd == "AFTERNOON") - remarkStr += "ครึ่งวันบ่าย"; - } - else - { - remarkStr += "เต็มวัน"; - } - } - - // if (leaveRange == "MORNING") - // remarkStr += "ครึ่งวันเช้า"; - // else if (leaveRange == "AFTERNOON") - // remarkStr += "ครึ่งวันบ่าย"; - - - // // var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - // // if (leaveRangeEnd == "MORNING") - // // remarkStr += "ครึ่งวันเช้า"; - // // else if (leaveRangeEnd == "AFTERNOON") - // // remarkStr += "ครึ่งวันบ่าย"; - - // var leaveRangeEnd = leaveReq.LeaveRangeEnd == null ? "" : leaveReq.LeaveRangeEnd.ToUpper(); - // if (leaveRange != leaveRangeEnd) - // { - // if (leaveRangeEnd == "MORNING") - // remarkStr += " - ครึ่งวันเช้า"; - // else if (leaveRangeEnd == "AFTERNOON") - // remarkStr += " - ครึ่งวันบ่าย"; - // } - break; - default: - remarkStr += leaveReq.Type.Name; - break; - } - } - else - { - if (timeStamps == null) - { - if (dd.date <= DateTime.Now.Date) - { - remarkStr = "ขาดราชการ"; - if (dd.isHoliday == true) - { - remarkStr = $"วันหยุด ({dd.dateRemark})"; - } - else if (dd.isWeekEnd) - { - remarkStr = dd.dateRemark; - } - } - else remarkStr = ""; - } - else - { - // check status ของการลงเวลา - if (timeStamps.CheckOut != null) - { - if (timeStamps.CheckOutStatus == "ABSENT") - remarkStr = "ขาดราชการ" + (!timeStamps.IsLocationCheckOut ? $" (นอกสถานที่:{timeStamps.CheckOutLocationName})".Trim() : ""); - else if (timeStamps.CheckInStatus == "ABSENT") - remarkStr = "ขาดราชการ" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - else if (timeStamps.CheckInStatus == "LATE") - { - remarkStr = "สาย" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - lateTotal += 1; - } - else - remarkStr = !timeStamps.IsLocationCheckIn ? $" นอกสถานที่:{timeStamps.CheckInLocationName}".Trim() : ""; - } - else - { - if (timeStamps.CheckInStatus == "ABSENT") - remarkStr = "ขาดราชการ" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - else if (timeStamps.CheckInStatus == "LATE") - { - remarkStr = "สาย" + (!timeStamps.IsLocationCheckIn ? $" (นอกสถานที่:{timeStamps.CheckInLocationName})".Trim() : ""); - lateTotal += 1; - } - else - remarkStr = !timeStamps.IsLocationCheckIn ? $" นอกสถานที่:{timeStamps.CheckInLocationName}".Trim() : ""; - } - } - } - - var emp = new DateResultReport - { - no = count, - fullName = fullName, - dutyTimeName = $"{duty.StartTimeMorning} - {duty.EndTimeAfternoon} น.", - checkInLocation = timeStamps == null ? "" : timeStamps.CheckInPOI, - checkInTime = timeStamps == null ? "" : $"{timeStamps.CheckIn.ToString("HH:mm")} น.", - checkOutLocation = timeStamps == null ? "" : timeStamps.CheckOutPOI ?? "", - checkOutTime = timeStamps == null ? "" : - timeStamps.CheckOut != null ? - $"{timeStamps.CheckOut.Value.ToString("HH:mm")} น." : - "", - remark = remarkStr, - checkInDate = timeStamps == null ? dd.date.Date.ToThaiFullDate2() : timeStamps.CheckIn.Date.ToThaiFullDate2(), - checkedOutDate = timeStamps == null ? dd.date.Date.ToThaiFullDate2() : - timeStamps.CheckOut != null ? - timeStamps.CheckOut.Value.ToThaiFullDate2() : - "", - checkInTimeRaw = timeStamps == null ? dd.date.Date : timeStamps?.CheckIn, - checkOutTimeRaw = timeStamps == null ? dd.date.Date : timeStamps?.CheckOut != null ? timeStamps?.CheckOut : null, - }; - - if (timeStamps != null) - { - workTotal += 1; - if (!timeStamps.IsLocationCheckIn) - { - if (timeStamps.CheckInLocationName!.Contains("ปฏิบัติงานที่บ้าน")) - wfhTotal += 1; - else if (timeStamps.CheckInLocationName == "ไปประชุม / อบรม / สัมมนา") - seminarTotal += 1; - else if (timeStamps.CheckInLocationName.Contains("ปฏิบัติงานนอกสถานที่")) - wfaTotal += 1; - else if (timeStamps.CheckInLocationName.Contains("ขออนุญาตออกนอกสถานที่")) - outOfficeTotal += 1; - else if (timeStamps.CheckInLocationName.Contains("ปฏิบัติงานในจุดบริการด่วนมหานคร")) - oneStopSrvrTotal += 1; - else otherTotal += 1; - // else if (timeStamps.CheckInLocationName.Contains("อื่นๆ")) - // otherTotal += 1; - } - } - - if (leaveReq != null) - { - switch (leaveReq.Type.Code.ToUpper()) - { - case "LV-001": - case "LV-002": - sickTotal += 1; - break; - case "LV-005": - restTotal += 1; - break; - case "LV-008": - studyTotal += 1; - break; - } - } - - employees.Add(emp); - count++; - } - } - //employees = employees.OrderBy(x => x.checkInDate).ThenBy(x => x.checkInTimeRaw ?? DateTime.MaxValue).ThenBy(x => x.checkOutTimeRaw ?? DateTime.MaxValue).ToList(); - employees = employees - .OrderBy(x => x.checkInTime.Trim() != "" ? 0 : 1) // เรียงตามวันที่ลงเวลา - .ThenBy(x => x.remark.Trim() == "" ? 0 : 1) // ข้อมูลที่ไม่มี remark ให้ขึ้นก่อน - .ThenBy(x => x.checkInTimeRaw ?? DateTime.MaxValue).ThenBy(x => x.checkOutTimeRaw ?? DateTime.MaxValue) - .ThenBy(x => x.remark) // จากนั้นจัดเรียงตาม remark - .ToList(); - for (int i = 0; i < employees.Count; i++) - { - employees[i].no = i + 1; - } - - var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate()}"; - var org = _userProfileRepository.GetOc(Guid.Parse(req.nodeId), req.node, AccessToken); - var organizationName = org == null ? "" : $"{(!string.IsNullOrEmpty(org.Child4) ? org.Child4 + "/" : "")}{(!string.IsNullOrEmpty(org.Child3) ? org.Child3 + "/" : "")}{(!string.IsNullOrEmpty(org.Child2) ? org.Child2 + "/" : "")}{(!string.IsNullOrEmpty(org.Child1) ? org.Child1 + "/" : "")}{org.Root ?? ""}"; - var dateTimeStamp = $"ประจำ ณ วัน{req.StartDate.Date.GetThaiDayOfWeek()} ที่ {req.StartDate.Date.ToThaiShortDate()}{enddate}"; - - var templatePath = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", "TimeStampRecords.xlsx"); - byte[] templateBytes = System.IO.File.ReadAllBytes(templatePath); - - using (var stream = new MemoryStream(templateBytes)) - using (var package = new ExcelPackage(stream)) - { - - var worksheet = package.Workbook.Worksheets["Sheet1"] ?? package.Workbook.Worksheets[0]; - // กำหนดให้ใช้ฟอนต์ TH SarabunPSK ซึ่งเป็นฟอนต์มาตรฐานราชการไทย - // **ข้อควรระวัง:** หากเครื่องผู้ใช้ไม่มีฟอนต์นี้ติดตั้งอยู่ การจัดหน้าเอกสารจะเพี้ยน - worksheet.Cells.Style.Font.Name = "TH SarabunPSK"; - - worksheet.Cells["A1:J1"].Merge = true; - worksheet.Cells["A2:J2"].Merge = true; - worksheet.Cells["A3:J3"].Merge = true; - - using (var range = worksheet.Cells["A1:J3"]) - { - range.Style.HorizontalAlignment = OfficeOpenXml.Style.ExcelHorizontalAlignment.Center; - range.Style.VerticalAlignment = OfficeOpenXml.Style.ExcelVerticalAlignment.Center; - range.Style.Font.Bold = true; - } - - worksheet.Cells[2, 1].Value = organizationName; - worksheet.Cells[3, 1].Value = dateTimeStamp; - - int startRow = 5; - int colCount = 10; - int totalRows = employees.Count; - - // ตรวจสอบว่ามีข้อมูลหรือไม่ - if (totalRows > 0) - { - // เตรียม List สำหรับใช้กับ LoadFromArrays - var data = new List(totalRows); - for (int i = 0; i < totalRows; i++) - { - var emp = employees[i]; - data.Add(new object[] - { - emp.no, - emp.fullName, - emp.dutyTimeName, - emp.checkInDate, - emp.checkInLocation, - emp.checkInTime, - emp.checkedOutDate, - emp.checkOutLocation, - emp.checkOutTime, - emp.remark - }); - } - - // เขียนข้อมูลลง Excel ครั้งเดียว - worksheet.Cells[startRow, 1].LoadFromArrays(data); - - // กำหนดสไตล์ตัวบาง + ขอบ - using (var range = worksheet.Cells[startRow, 1, startRow + totalRows - 1, colCount]) - { - range.Style.Font.Bold = false; - range.Style.Border.Top.Style = OfficeOpenXml.Style.ExcelBorderStyle.Thin; - range.Style.Border.Bottom.Style = OfficeOpenXml.Style.ExcelBorderStyle.Thin; - range.Style.Border.Left.Style = OfficeOpenXml.Style.ExcelBorderStyle.Thin; - range.Style.Border.Right.Style = OfficeOpenXml.Style.ExcelBorderStyle.Thin; - range.Style.VerticalAlignment = OfficeOpenXml.Style.ExcelVerticalAlignment.Top; - - // Center Align: คอลัมน์ 1 (A), 3 (C), 4 (D), 6 (F), 7 (G), 9 (I) - var centerColumns = new[] { 1, 3, 4, 6, 7, 9 }; - foreach (var col in centerColumns) - { - worksheet.Cells[startRow, col, startRow + totalRows - 1, col].Style.HorizontalAlignment = ExcelHorizontalAlignment.Center; - } - - // Left Align: คอลัมน์ 2 (B), 5 (E), 8 (H), 10 (J) - var leftColumns = new[] { 2, 5, 8, 10 }; - foreach (var col in leftColumns) - { - worksheet.Cells[startRow, col, startRow + totalRows - 1, col].Style.HorizontalAlignment = ExcelHorizontalAlignment.Left; - } - } - } - else - { - // กรณีไม่มีข้อมูล ใส่ข้อความแจ้ง - worksheet.Cells[startRow, 1].Value = "ไม่มีข้อมูล"; - worksheet.Cells[startRow, 1, startRow, colCount].Merge = true; - worksheet.Cells[startRow, 1].Style.HorizontalAlignment = ExcelHorizontalAlignment.Center; - worksheet.Cells[startRow, 1].Style.Font.Bold = true; - } - - // ส่วนสรุปท้ายตาราง - int lastRow = startRow + totalRows + 2; - - worksheet.Cells[lastRow, 2].Value = type.Trim().ToUpper() == "OFFICER" ? "ข้าราชการทั้งหมด" : "ลูกจ้างประจำทั้งหมด"; - worksheet.Cells[lastRow, 5].Value = profile?.Count; - worksheet.Cells[lastRow, 6].Value = "คน"; - worksheet.Cells[lastRow, 8].Value = "นอกสถานที่ตั้ง"; - worksheet.Cells[lastRow + 1, 2].Value = "มาปฏิบัติราชการ"; - worksheet.Cells[lastRow + 1, 5].Value = workTotal; - worksheet.Cells[lastRow + 1, 6].Value = "คน"; - worksheet.Cells[lastRow + 1, 8].Value = "WFH"; - worksheet.Cells[lastRow + 1, 9].Value = wfhTotal; - worksheet.Cells[lastRow + 1, 10].Value = "คน"; - worksheet.Cells[lastRow + 2, 2].Value = "ลาพักผ่อน"; - worksheet.Cells[lastRow + 2, 5].Value = restTotal; - worksheet.Cells[lastRow + 2, 6].Value = "คน"; - worksheet.Cells[lastRow + 2, 8].Value = "อบรม ประชุม สัมมนาฯ"; - worksheet.Cells[lastRow + 2, 9].Value = seminarTotal; - worksheet.Cells[lastRow + 2, 10].Value = "คน"; - worksheet.Cells[lastRow + 3, 8].Value = "ปฎิบัติงานนอกสถานที่"; - worksheet.Cells[lastRow + 3, 9].Value = wfaTotal; - worksheet.Cells[lastRow + 3, 10].Value = "คน"; - worksheet.Cells[lastRow + 4, 8].Value = "ขออนุญาตออกนอกสถานที่"; - worksheet.Cells[lastRow + 4, 9].Value = outOfficeTotal; - worksheet.Cells[lastRow + 4, 10].Value = "คน"; - worksheet.Cells[lastRow + 5, 8].Value = "ปฎิบัติงานในจุดบริการด่วนมหานคร"; - worksheet.Cells[lastRow + 5, 9].Value = oneStopSrvrTotal; - worksheet.Cells[lastRow + 5, 10].Value = "คน"; - worksheet.Cells[lastRow + 6, 8].Value = "อื่นๆ"; - worksheet.Cells[lastRow + 6, 9].Value = otherTotal; - worksheet.Cells[lastRow + 6, 10].Value = "คน"; - - - - - - worksheet.Cells[lastRow + 3, 2].Value = "ลาป่วย/ลากิจ"; - worksheet.Cells[lastRow + 3, 5].Value = sickTotal; - worksheet.Cells[lastRow + 3, 6].Value = "คน"; - worksheet.Cells[lastRow + 4, 2].Value = "มาสาย"; - worksheet.Cells[lastRow + 4, 5].Value = lateTotal; - worksheet.Cells[lastRow + 4, 6].Value = "คน"; - worksheet.Cells[lastRow + 8, 2].Value = "เรียน"; - worksheet.Cells[lastRow + 9, 2].Value = "เพื่อโปรดทราบ"; - worksheet.Cells[lastRow + 9, 9].Value = "ทราบ"; - worksheet.Cells[lastRow + 9, 9].Style.Font.Bold = true; - worksheet.Cells[lastRow + 9, 9].Style.Font.Size = 22; - worksheet.Cells[lastRow + 10, 2].Value = "................................"; - worksheet.Cells[lastRow + 10, 9].Value = "................................"; - worksheet.Cells[worksheet.Dimension.Address].AutoFitColumns(); - var fileBytes = package.GetAsByteArray(); - return File(fileBytes, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "TimeStampRecords.xlsx"); - } - } - catch (Exception ex) - { - return Error(ex); - } - } - /// /// LV2_035 - รายงานการเข้างานสาย จำแนกเป็นรายบุคคลและหรือรายหน่วยงาน/ส่วนราชการ /// @@ -2868,7 +1411,7 @@ namespace BMA.EHR.Leave.Service.Controllers { try { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_WORK_REPORT"); + var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_LEAVE_REPORT"); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { @@ -2877,76 +1420,26 @@ namespace BMA.EHR.Leave.Service.Controllers var employees = new List(); var count = 1; - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - var getDefaultRound = await _dutyTimeRepository.GetDefaultAsync(); - if (getDefaultRound == null) - { - return Error("ไม่พบรอบลงเวลา Default", StatusCodes.Status404NotFound); - } - var userTimeStamps = await _processUserTimeStampRepository.GetTimestampByDateLateAsync(type.Trim().ToUpper(), role, nodeId, profileAdmin.Node, req.nodeId, req.node, req.StartDate, req.EndDate); + var userTimeStamps = await _processUserTimeStampRepository.GetTimestampByDateLateAsync(type.Trim().ToUpper(), jsonData["result"]?.ToString(), req.nodeId, req.node); foreach (var p in userTimeStamps) { var fullName = $"{p.Prefix}{p.FirstName} {p.LastName}"; - UserDutyTime? effectiveDate = null; - - effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.ProfileId ?? Guid.Empty); - //return Error($"{data.Id} PF{data.FirstName} {data.LastName} : {GlobalMessages.DataNotFound}", StatusCodes.Status404NotFound); - - //var userRound = await _dutyTimeRepository.GetByIdAsync(profile.DutyTimeId ?? Guid.Empty); + var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id); var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); - var duty = userRound ?? getDefaultRound; - - // var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id); - // var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty; - // var userRound = await _dutyTimeRepository.GetByIdAsync(roundId); - - // var duty = userRound; - // if (duty == null) - // { - // duty = await _dutyTimeRepository.GetDefaultAsync(); - // if (duty == null) - // { - // return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound); - // } - // } - DateTime? checkIn = p.CheckIn; + var duty = userRound; + if (duty == null) + { + duty = await _dutyTimeRepository.GetDefaultAsync(); + if (duty == null) + { + return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound); + } + } + DateTime? checkIn = p.CheckIn ?? null; DateTime? checkOut = p.CheckOut ?? null; var emp = new { @@ -2954,9 +1447,9 @@ namespace BMA.EHR.Leave.Service.Controllers fullName = fullName, dutyTimeName = $"{duty.StartTimeMorning} - {duty.EndTimeAfternoon} น.", checkInLocation = p.CheckInPOI, - checkInTime = checkIn?.ToString("HH:mm") is string timeIn ? $"{timeIn} น." : "", + checkInTime = $"{checkIn?.ToString("HH:mm") ?? ""} น.", checkOutLocation = p.CheckOutPOI ?? "", - checkOutTime = checkOut?.ToString("HH:mm") is string timeOut ? $"{timeOut} น." : "", + checkOutTime = $"{checkOut?.ToString("HH:mm") ?? ""} น.", remark = "", checkInDate = checkIn?.ToThaiFullDate2()?.ToThaiNumber() ?? "", checkedOutDate = checkOut?.ToThaiFullDate2()?.ToThaiNumber() ?? "", @@ -2966,13 +1459,10 @@ namespace BMA.EHR.Leave.Service.Controllers } var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate().ToThaiNumber()}"; - var org = _userProfileRepository.GetOc(Guid.Parse(req.nodeId), req.node, AccessToken); - var organizationName = $"{(!string.IsNullOrEmpty(org.Child4) ? org.Child4 + "/" : "")}{(!string.IsNullOrEmpty(org.Child3) ? org.Child3 + "/" : "")}{(!string.IsNullOrEmpty(org.Child2) ? org.Child2 + "/" : "")}{(!string.IsNullOrEmpty(org.Child1) ? org.Child1 + "/" : "")}{org.Root ?? ""}"; var item = new { dateTimeStamp = $"ณ วันที่ {req.StartDate.Date.ToThaiShortDate().ToThaiNumber()}{enddate}", - //organizationName = _userProfileRepository.GetOc(Guid.Parse(req.nodeId), req.node, AccessToken)?.Root ?? "", - organizationName = organizationName, + organizationName = _userProfileRepository.GetOc(Guid.Parse(req.nodeId), req.node, AccessToken)?.Root ?? "", employees = employees }; @@ -3013,52 +1503,8 @@ namespace BMA.EHR.Leave.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByRootAndRange(req.StartDate, req.EndDate, type, jsonData["result"]?.ToString(), nodeId, profileAdmin?.Node, req.nodeId, req.node); + var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByRootAndRange(req.StartDate, req.EndDate, type, jsonData["result"]?.ToString(), req.nodeId, req.node); var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate().ToThaiNumber()}"; - - // var thisYear = req.StartDate.Year; - // var toDay = req.StartDate.Date; - // if (toDay >= new DateTime(toDay.Year, 10, 1) && toDay <= new DateTime(toDay.Year, 12, 31)) - // thisYear = thisYear + 1; - - // var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUser2Async(thisYear, type, data.KeycloakUserId); - var result = new { template = "leave2", @@ -3079,79 +1525,5 @@ namespace BMA.EHR.Leave.Service.Controllers } #endregion - private async Task GetApproverData(List list) - { - var _default = new - { - fullName = "............................................", - positionName = "............................................", - posExOrg = Array.Empty(), - positionSign = "............................................", - updatedAt = "............/............/............", - comment = "......................................................................................................................................................................", - approveType = "" - }; - - var approvers = list - .Select(x => new - { - fullName = $"{(x.Prefix ?? "")}{(x.FirstName ?? "")} {(x.LastName ?? "")}".Trim(), - positionName = (!string.IsNullOrEmpty(x.PositionLevelName) && - (x.PositionLevelName.Contains("อำนวยการ") || x.PositionLevelName.Contains("บริหาร")) - ? string.IsNullOrEmpty(x.PosExecutiveName) - ? string.IsNullOrEmpty(x.PositionName) - ? "............................................" - : x.PositionName - : x.PosExecutiveName - : string.IsNullOrEmpty(x.PositionName) - ? "............................................" - : string.IsNullOrEmpty(x.PositionLevelName) - ? x.PositionName - : $"{x.PositionName}{x.PositionLevelName}").ToThaiNumber(), - posExOrg = !string.IsNullOrEmpty(x.PositionLevelName) && - (x.PositionLevelName.Contains("อำนวยการ") || x.PositionLevelName.Contains("บริหาร")) - ? new[] { (x!.OrganizationName.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.")).ToThaiNumber() } - : !string.IsNullOrEmpty(x.PosExecutiveName) - ? new[] { x.PosExecutiveName.ToThaiNumber(), x!.OrganizationName.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber() } - : new[] { x!.OrganizationName.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.").ToThaiNumber() }, - positionSign = !string.IsNullOrEmpty(x.PositionSign) - ? x.PositionSign.Replace("\r", "").Replace("\n", " ").ToThaiNumber() - : "............................................", - updatedAt = x.LastUpdatedAt.HasValue - ? x.LastUpdatedAt.Value.Date.ToThaiShortDate().ToThaiNumber() - : "............/............/............", - comment = !string.IsNullOrEmpty(x.Comment) - ? (x.Comment.Replace("\r", "").Replace("\n", " ").Trim()).ToThaiNumber() - : "......................................................................................................................................................................", - approveType = (x.ApproveType ?? "").Trim().ToUpper() - }) - .ToList(); - - // การเจ้าหน้าที่ - var sender = approvers - .FirstOrDefault(x => x.approveType == "SENDER") - ?? _default; - - // ผู้บังคับบัญชา (มีได้มากกว่า 1 คน) - var commanders = approvers - .Where(x => x.approveType == "COMMANDER") - .DefaultIfEmpty(_default) - .ToList(); - - // ผู้มีอำนาจ - var approver = approvers - .FirstOrDefault(x => x.approveType == "APPROVER") - ?? _default; - - return new - { - sign = "............................................", - sender = sender, - approver = approver, - commanders = commanders - }; - - } - } } \ No newline at end of file diff --git a/BMA.EHR.Leave/Controllers/LeaveRequestController.cs b/BMA.EHR.Leave/Controllers/LeaveRequestController.cs index 9b1140cd..e73e5f45 100644 --- a/BMA.EHR.Leave/Controllers/LeaveRequestController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveRequestController.cs @@ -3,12 +3,10 @@ using BMA.EHR.Application.Repositories.Commands; using BMA.EHR.Application.Repositories.Leaves.LeaveRequests; using BMA.EHR.Application.Repositories.Leaves.TimeAttendants; using BMA.EHR.Application.Repositories.MetaData; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Models.Leave.Commons; using BMA.EHR.Domain.Models.Leave.Requests; -using BMA.EHR.Domain.Models.Notifications; using BMA.EHR.Domain.Shared; using BMA.EHR.Infrastructure.Persistence; using BMA.EHR.Leave.Service.DTOs.LeaveRequest; @@ -17,12 +15,11 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using NodaTime; using Org.BouncyCastle.Asn1.Pkcs; -using Sentry; using Swashbuckle.AspNetCore.Annotations; using System.Net.Http.Headers; using System.Security.Claims; +using System.Security.Policy; namespace BMA.EHR.Leave.Service.Controllers { @@ -37,7 +34,6 @@ namespace BMA.EHR.Leave.Service.Controllers #region " Fields " private readonly LeaveDbContext _context; - private readonly ApplicationDBContext _appDbContext; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IWebHostEnvironment _hostingEnvironment; private readonly IConfiguration _configuration; @@ -49,7 +45,6 @@ namespace BMA.EHR.Leave.Service.Controllers private readonly CommandRepository _commandRepository; private readonly UserCalendarRepository _userCalendarRepository; private readonly PermissionRepository _permission; - private readonly LeaveBeginningRepository _leaveBeginningRepository; private const string APPROVE_STEP_CREATE = "st1"; private const string APPROVE_STEP_OFFICER_APPROVE = "st2"; @@ -57,8 +52,6 @@ namespace BMA.EHR.Leave.Service.Controllers private const string APPROVE_STEP_APPROVE = "st4"; private const string APPROVE_STEP_REJECT = "st5"; - private readonly string URL = string.Empty; - #endregion #region " Constuctor and Destructor " @@ -74,9 +67,7 @@ namespace BMA.EHR.Leave.Service.Controllers HolidayRepository holidayRepository, CommandRepository commandRepository, UserCalendarRepository userCalendarRepository, - PermissionRepository permission, - LeaveBeginningRepository leaveBeginningRepository, - ApplicationDBContext appDbContext) + PermissionRepository permission) { _context = context; _httpContextAccessor = httpContextAccessor; @@ -90,10 +81,6 @@ namespace BMA.EHR.Leave.Service.Controllers _commandRepository = commandRepository; _userCalendarRepository = userCalendarRepository; _permission = permission; - _leaveBeginningRepository = leaveBeginningRepository; - _appDbContext = appDbContext; - - URL = (_configuration["VITE_URL_MGT"]).Replace("/api/v1", ""); } #endregion @@ -123,75 +110,6 @@ namespace BMA.EHR.Leave.Service.Controllers #region " Methods " - /// - /// เพิ่มรายชิื่อผู้อนุมัติ หรือ ผู้บังคับบัญชา - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("officer/add-approver/{type}/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> AddApprover(string type, Guid id, [FromBody] List req) - { - try - { - var leaveReq = await _leaveRequestRepository.GetByIdAsync(id); - if (leaveReq == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - await _leaveRequestRepository.RemoveApproversAsync(id, type); - //var delete = leaveReq.Approvers.RemoveAll(x => x.ApproveType.ToUpper() == type.Trim().ToUpper()); - //await _leaveRequestRepository.UpdateAsync(leaveReq); - - var addList = new List(); - - foreach (var r in req) - { - addList.Add(new LeaveRequestApprover - { - Seq = r.Seq, - Prefix = r.Prefix, - FirstName = r.FirstName, - LastName = r.LastName, - PositionName = r.PositionName, - PositionSign = r.PositionSign, - PosExecutiveName = r.PosExecutiveName, - PositionLevelName = r.PositionLeaveName, - OrganizationName = r.OrganizationName, - ProfileId = r.ProfileId, - KeycloakId = r.KeycloakId, - ApproveStatus = "PENDING", - ApproveType = type.Trim().ToUpper(), - - CreatedFullName = FullName ?? "", - CreatedUserId = UserId!, - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "", - LastUpdateUserId = UserId!, - LastUpdatedAt = DateTime.Now, - - IsAct = r.isAct, - KeyId = r.keyId - }); - } - - await _leaveRequestRepository.AddApproversAsync(id, addList); - - return Success(); - - } - catch (Exception ex) - { - return Error(ex); - } - } - /// /// LV2_001 - สร้างคำขอการลา (USER) /// @@ -216,8 +134,7 @@ namespace BMA.EHR.Leave.Service.Controllers var thisYear = DateTime.Now.Year; - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); if (profile == null) { @@ -253,10 +170,7 @@ namespace BMA.EHR.Leave.Service.Controllers var leaveRequest = new LeaveRequest { Type = leaveType, - - LeaveSubTypeName = req.LeaveSubTypeName, LeaveRange = req.LeaveRange, - LeaveRangeEnd = req.LeaveRangeEnd, LeaveStartDate = req.LeaveStartDate, LeaveEndDate = req.LeaveEndDate, LeaveWrote = req.LeaveWrote ?? "", @@ -295,12 +209,6 @@ namespace BMA.EHR.Leave.Service.Controllers Amount = profile.Amount, BirthDate = profile.BirthDate, DateAppoint = profile.DateAppoint, - - RootDnaId = profile.RootDnaId, - Child1DnaId = profile.Child1DnaId, - Child2DnaId = profile.Child2DnaId, - Child3DnaId = profile.Child3DnaId, - Child4DnaId = profile.Child4DnaId, }; // get leave last @@ -382,15 +290,11 @@ namespace BMA.EHR.Leave.Service.Controllers break; case "LV-008": { - // var lastSalary = profile.ProfileSalary; - // var lastSalaryAmount = lastSalary == null ? 0 : lastSalary.Amount == null ? 0 : lastSalary.Amount; - // var lastSalaryAmountText = lastSalary == null ? "" : lastSalary.Amount == null ? "" : ((int)lastSalary.Amount).ToThaiBahtText(false); - // leaveRequest.LeaveSalary = (int)lastSalaryAmount; - // leaveRequest.LeaveSalaryText = lastSalaryAmountText; - leaveRequest.LeaveSalary = profile.Amount.HasValue && profile.Amount > 0 - ? (int)profile.Amount : 0; - leaveRequest.LeaveSalaryText = profile.Amount.HasValue && profile.Amount > 0 - ? ((int)profile.Amount).ToThaiBahtText(false) : ""; + var lastSalary = profile.ProfileSalary; + var lastSalaryAmount = lastSalary == null ? 0 : lastSalary.Amount == null ? 0 : lastSalary.Amount; + var lastSalaryAmountText = lastSalary == null ? "" : lastSalary.Amount == null ? "" : ((int)lastSalary.Amount).ToThaiBahtText(false); + leaveRequest.LeaveSalary = (int)lastSalaryAmount; + leaveRequest.LeaveSalaryText = lastSalaryAmountText; //leaveRequest.LeaveSalary = lastSalary == null ? 0 : (int)lastSalary.Amount.Value; //leaveRequest.LeaveSalaryText = // lastSalary == null ? "" : ((int)lastSalary.Amount.Value).ToThaiBahtText(false); @@ -410,15 +314,11 @@ namespace BMA.EHR.Leave.Service.Controllers break; case "LV-010": { - // var lastSalary = profile.ProfileSalary; - // var lastSalaryAmount = lastSalary == null ? 0 : lastSalary.Amount == null ? 0 : lastSalary.Amount; - // var lastSalaryAmountText = lastSalary == null ? "" : lastSalary.Amount == null ? "" : ((int)lastSalary.Amount).ToThaiBahtText(false); - // leaveRequest.LeaveSalary = (int)lastSalaryAmount; - // leaveRequest.LeaveSalaryText = lastSalaryAmountText; - leaveRequest.LeaveSalary = profile.Amount.HasValue && profile.Amount > 0 - ? (int)profile.Amount : 0; - leaveRequest.LeaveSalaryText = profile.Amount.HasValue && profile.Amount > 0 - ? ((int)profile.Amount).ToThaiBahtText(false) : ""; + var lastSalary = profile.ProfileSalary; + var lastSalaryAmount = lastSalary == null ? 0 : lastSalary.Amount == null ? 0 : lastSalary.Amount; + var lastSalaryAmountText = lastSalary == null ? "" : lastSalary.Amount == null ? "" : ((int)lastSalary.Amount).ToThaiBahtText(false); + leaveRequest.LeaveSalary = (int)lastSalaryAmount; + leaveRequest.LeaveSalaryText = lastSalaryAmountText; //leaveRequest.LeaveSalary = lastSalary == null ? 0 : (int)lastSalary.Amount.Value; //leaveRequest.LeaveSalaryText = // lastSalary == null ? "" : ((int)lastSalary.Amount.Value).ToThaiBahtText(false); @@ -443,7 +343,7 @@ namespace BMA.EHR.Leave.Service.Controllers // add dear and oc_data //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); - // var approver = profile.Commander ?? ""; + var approver = profile.Commander ?? ""; var userOc = profile.Root ?? ""; //if (rootOc != null) //{ @@ -454,40 +354,11 @@ namespace BMA.EHR.Leave.Service.Controllers leaveRequest.LeaveTypeCode = leaveType.Code; - leaveRequest.Dear = req.Dear ?? ""; - leaveRequest.CommanderPosition = req.CommanderPosition ?? ""; - - // เพิ่มตำแหน่ง - //leaveRequest.CommanderPosition = req.CommanderPosition ?? ""; - + leaveRequest.Dear = approver; leaveRequest.PositionName = profile.Position == null ? "" : profile.Position; leaveRequest.PositionLevelName = profile.PosLevel == null ? "" : profile.PosLevel; leaveRequest.OrganizationName = userOc; - //if (req.Approvers != null && req.Approvers != "") - //{ - // //var jsonString = System.Text.Json.JsonSerializer.Deserialize(req.Approvers ?? ""); - // //var fixedJson = req.Approvers.Replace("\\\"", "\""); - // var approvers = JsonConvert.DeserializeObject>(req.Approvers); - // if (approver != null) - // { - // foreach (var r in approvers!) - // { - // leaveRequest.Approvers.Add(new LeaveRequestApprover - // { - // Seq = r.Seq, - // Prefix = r.Prefix, - // FirstName = r.FirstName, - // LastName = r.LastName, - // PositionName = r.PositionName, - // ProfileId = r.ProfileId, - // KeycloakId = r.KeycloakId, - // ApproveStatus = "PENDING", - // }); - // } - // } - - //} // save to database @@ -504,8 +375,7 @@ namespace BMA.EHR.Leave.Service.Controllers foreach (var leave in leaves) { - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(leave.KeycloakUserId, AccessToken); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(leave.KeycloakUserId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(leave.KeycloakUserId, AccessToken); if (profile != null) { leave.Prefix = profile.Prefix; @@ -548,269 +418,239 @@ namespace BMA.EHR.Leave.Service.Controllers [ProducesResponseType(StatusCodes.Status500InternalServerError)] public async Task> EditLeaveRequestAsync(Guid id, [FromForm] CreateLeaveRequestDto req) { - try + var oldData = await _leaveRequestRepository.GetByIdAsync(id); + if (oldData == null) { - var oldData = await _leaveRequestRepository.GetByIdAsync(id); - if (oldData == null) + return Error(GlobalMessages.DataNotFound); + } + + var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); + var thisYear = DateTime.Now.Year; + + // var isDuplicate = await _leaveRequestRepository.CheckDuplicateLeave(userId, req.LeaveStartDate.Date, req.LeaveEndDate.Date); + // if (isDuplicate) + // { + // return Error("ไม่สามารถขอลาในช่วงเวลาเดียวกันได้"); + // } + + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); + + if (profile == null) + { + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + } + + var userCalendar = await _userCalendarRepository.GetExist(profile.Id); + var category = userCalendar == null ? "NORMAL" : userCalendar.Calendar; + + var leaveType = await _context.Set().AsNoTracking().FirstOrDefaultAsync(x => x.Id == req.Type); // _leaveTypeRepository.GetByIdAsync(req.Type); + if (leaveType == null) + { + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + } + + var sumLeave = req.LeaveStartDate.DiffDay(req.LeaveEndDate); + var sumHoliday = await _holidayRepository.GetHolidayCountAsync(req.LeaveStartDate, req.LeaveEndDate, category); + var sumWeekend = _holidayRepository.GetWeekEndCount(req.LeaveStartDate, req.LeaveEndDate, category); + + // var leaveTotal = 0.0; + // if (req.LeaveRange != "ALL") + // leaveTotal = 0.5; + // else + // leaveTotal = sumLeave - sumHoliday - sumWeekend; + + // ลองใช้ oldData + oldData.LeaveRange = req.LeaveRange; + oldData.LeaveStartDate = req.LeaveStartDate; + oldData.LeaveEndDate = req.LeaveEndDate; + oldData.LeaveWrote = req.LeaveWrote ?? ""; + oldData.LeaveDetail = req.LeaveDetail ?? ""; + oldData.LeaveAddress = req.LeaveAddress ?? ""; + oldData.LeaveNumber = req.LeaveNumber ?? ""; + oldData.LeaveTotal = req.LeaveTotal; + oldData.LeaveSalaryText = req.LeaveSalaryText ?? ""; + + /*** remove old code + + var leaveRequest = new LeaveRequest + { + Id = id, + Type = leaveType, + LeaveRange = req.LeaveRange, + LeaveStartDate = req.LeaveStartDate, + LeaveEndDate = req.LeaveEndDate, + LeaveWrote = req.LeaveWrote ?? "", + LeaveDetail = req.LeaveDetail ?? "", + LeaveAddress = req.LeaveAddress ?? "", + LeaveNumber = req.LeaveNumber ?? "", + //LeaveTotal = req.LeaveStartDate.DiffDay(req.LeaveEndDate), + LeaveTotal = req.LeaveTotal, // change to get value from request + + + LeaveSalaryText = req.LeaveSalaryText ?? "", + LeaveStatus = oldData.LeaveStatus, + KeycloakUserId = userId, + ApproveStep = oldData.ApproveStep + }; + + // assign old upload documents to new request + leaveRequest.LeaveDraftDocument = oldData.LeaveDraftDocument; + leaveRequest.LeaveDocument.AddRange(oldData.LeaveDocument); + leaveRequest.LeaveCancelDocument = oldData.LeaveCancelDocument; + + // get leave last + leaveRequest.LeaveLast = await _leaveRequestRepository.GetLeaveLastByTypeForUserAsync(userId, req.Type); + + **/ + + // upload document + if (req.LeaveDocument != null) + { + foreach (var d in req.LeaveDocument) { - return Error(GlobalMessages.DataNotFound); - } - - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var thisYear = DateTime.Now.Year; - - // var isDuplicate = await _leaveRequestRepository.CheckDuplicateLeave(userId, req.LeaveStartDate.Date, req.LeaveEndDate.Date); - // if (isDuplicate) - // { - // return Error("ไม่สามารถขอลาในช่วงเวลาเดียวกันได้"); - // } - - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); - - if (profile == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var userCalendar = await _userCalendarRepository.GetExist(profile.Id); - var category = userCalendar == null ? "NORMAL" : userCalendar.Calendar; - - var leaveType = await _context.Set().AsNoTracking().FirstOrDefaultAsync(x => x.Id == req.Type); // _leaveTypeRepository.GetByIdAsync(req.Type); - if (leaveType == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var sumLeave = req.LeaveStartDate.DiffDay(req.LeaveEndDate); - var sumHoliday = await _holidayRepository.GetHolidayCountAsync(req.LeaveStartDate, req.LeaveEndDate, category); - var sumWeekend = _holidayRepository.GetWeekEndCount(req.LeaveStartDate, req.LeaveEndDate, category); - - // var leaveTotal = 0.0; - // if (req.LeaveRange != "ALL") - // leaveTotal = 0.5; - // else - // leaveTotal = sumLeave - sumHoliday - sumWeekend; - - // ลองใช้ oldData - oldData.LeaveRange = req.LeaveRange; - oldData.LeaveRangeEnd = req.LeaveRangeEnd; - oldData.LeaveStartDate = req.LeaveStartDate; - oldData.LeaveEndDate = req.LeaveEndDate; - oldData.LeaveWrote = req.LeaveWrote ?? ""; - oldData.LeaveDetail = req.LeaveDetail ?? ""; - oldData.LeaveAddress = req.LeaveAddress ?? ""; - oldData.LeaveNumber = req.LeaveNumber ?? ""; - oldData.LeaveTotal = req.LeaveTotal; - oldData.LeaveSalaryText = req.LeaveSalaryText ?? ""; - - //oldData.CommanderPosition = req.CommanderPosition ?? ""; - - /*** remove old code - - var leaveRequest = new LeaveRequest - { - Id = id, - Type = leaveType, - LeaveRange = req.LeaveRange, - LeaveStartDate = req.LeaveStartDate, - LeaveEndDate = req.LeaveEndDate, - LeaveWrote = req.LeaveWrote ?? "", - LeaveDetail = req.LeaveDetail ?? "", - LeaveAddress = req.LeaveAddress ?? "", - LeaveNumber = req.LeaveNumber ?? "", - //LeaveTotal = req.LeaveStartDate.DiffDay(req.LeaveEndDate), - LeaveTotal = req.LeaveTotal, // change to get value from request - - - LeaveSalaryText = req.LeaveSalaryText ?? "", - LeaveStatus = oldData.LeaveStatus, - KeycloakUserId = userId, - ApproveStep = oldData.ApproveStep - }; - - // assign old upload documents to new request - leaveRequest.LeaveDraftDocument = oldData.LeaveDraftDocument; - leaveRequest.LeaveDocument.AddRange(oldData.LeaveDocument); - leaveRequest.LeaveCancelDocument = oldData.LeaveCancelDocument; - - // get leave last - leaveRequest.LeaveLast = await _leaveRequestRepository.GetLeaveLastByTypeForUserAsync(userId, req.Type); - - **/ - - - - // switch from leave type - switch (leaveType.Code.Trim().ToUpper()) - { - case "LV-004": - { - oldData.WifeDayName = req.WifeDayName ?? ""; - oldData.WifeDayDateBorn = req.WifeDayDateBorn ?? ""; - } - break; - case "LV-005": - { - oldData.RestDayOldTotal = - await _leaveRequestRepository.GetRestDayTotalByYearForUserAsync(userId, thisYear - 1); - oldData.RestDayCurrentTotal = - await _leaveRequestRepository.GetRestDayTotalByYearForUserAsync(userId, thisYear); - } - break; - case "LV-006": - { - oldData.OrdainDayStatus = req.OrdainDayStatus ?? false; - oldData.OrdainDayLocationName = req.OrdainDayLocationName ?? ""; - oldData.OrdainDayLocationAddress = req.OrdainDayLocationAddress ?? ""; - oldData.OrdainDayLocationNumber = req.OrdainDayLocationNumber ?? ""; - if (req.OrdainDayOrdination != null) - oldData.OrdainDayOrdination = req.OrdainDayOrdination.Value; - - oldData.OrdainDayBuddhistLentName = req.OrdainDayBuddhistLentName ?? ""; - - oldData.OrdainDayBuddhistLentAddress = req.OrdainDayBuddhistLentAddress ?? ""; - - oldData.LeaveBirthDate = profile.BirthDate; - oldData.LeaveGovernmentDate = profile.DateStart; - - oldData.HajjDayStatus = req.HajjDayStatus ?? false; - } - break; - case "LV-007": - { - oldData.AbsentDayLocation = req.AbsentDayLocation ?? ""; - oldData.AbsentDaySummon = req.AbsentDaySummon ?? ""; - if (req.AbsentDayRegistorDate != null) - oldData.AbsentDayRegistorDate = req.AbsentDayRegistorDate.Value; - - oldData.AbsentDayGetIn = req.AbsentDayGetIn ?? ""; - - oldData.AbsentDayAt = req.AbsentDayAt ?? ""; - } - break; - case "LV-008": - { - // var lastSalary = profile.ProfileSalary; - - // oldData.LeaveSalary = lastSalary == null ? 0 : (int)lastSalary.Amount.Value; - // oldData.LeaveSalaryText = - // lastSalary == null ? "" : ((int)lastSalary.Amount.Value).ToThaiBahtText(false); - oldData.LeaveSalary = profile.Amount.HasValue && profile.Amount > 0 - ? (int)profile.Amount : 0; - oldData.LeaveSalaryText = profile.Amount.HasValue && profile.Amount > 0 - ? ((int)profile.Amount).ToThaiBahtText(false) : ""; - oldData.LeaveBirthDate = profile.BirthDate; - oldData.LeaveGovernmentDate = profile.DateStart; - - oldData.StudyDaySubject = req.StudyDaySubject ?? ""; - oldData.StudyDayDegreeLevel = req.StudyDayDegreeLevel ?? ""; - oldData.StudyDayUniversityName = req.StudyDayUniversityName ?? ""; - oldData.StudyDayCountry = req.StudyDayCountry ?? ""; - oldData.StudyDayScholarship = req.StudyDayScholarship ?? ""; - - oldData.StudyDayTrainingSubject = req.StudyDayTrainingSubject ?? ""; - oldData.StudyDayTrainingName = req.StudyDayTrainingName ?? ""; - } - break; - case "LV-010": - { - // var lastSalary = profile.ProfileSalary; - - // oldData.LeaveSalary = lastSalary == null ? 0 : (int)lastSalary.Amount.Value; - // oldData.LeaveSalaryText = - // lastSalary == null ? "" : ((int)lastSalary.Amount.Value).ToThaiBahtText(false); - oldData.LeaveSalary = profile.Amount.HasValue && profile.Amount > 0 - ? (int)profile.Amount : 0; - oldData.LeaveSalaryText = profile.Amount.HasValue && profile.Amount > 0 - ? ((int)profile.Amount).ToThaiBahtText(false) : ""; - oldData.CoupleDayName = req.CoupleDayName ?? ""; - oldData.CoupleDayPosition = req.CoupleDayPosition ?? ""; - oldData.CoupleDayLevel = req.CoupleDayLevel ?? ""; - oldData.CoupleDayLevelCountry = req.CoupleDayLevelCountry ?? ""; - oldData.CoupleDayCountryHistory = req.CoupleDayCountryHistory ?? ""; - oldData.CoupleDayTotalHistory = req.CoupleDayTotalHistory ?? ""; - - if (req.CoupleDayStartDateHistory != null) - oldData.CoupleDayStartDateHistory = req.CoupleDayStartDateHistory.Value; - - if (req.CoupleDayEndDateHistory != null) - oldData.CoupleDayEndDateHistory = req.CoupleDayEndDateHistory.Value; - - oldData.CoupleDaySumTotalHistory = req.CoupleDaySumTotalHistory ?? ""; - } - break; - } - - // add dear and oc_data - //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); - //var approver = string.Empty; - //if (rootOc != null) - //{ - // var list = await _commandRepository.GetOrgApproverAsync(rootOc ?? Guid.Empty); - // if (list.Count > 0) - // approver = list.First().Name; - //} - - oldData.LeaveTypeCode = leaveType.Code; - oldData.Dear = req.Dear ?? ""; - oldData.CommanderPosition = req.CommanderPosition ?? ""; - - - oldData.PositionName = profile.Position == null ? "" : profile.Position; - oldData.PositionLevelName = profile.PosLevel == null ? "" : profile.PosLevel; - oldData.OrganizationName = profile.Oc ?? ""; - - _context.Entry(oldData.Type).State = Microsoft.EntityFrameworkCore.EntityState.Detached; - //_context.Entry(leaveRequest.Type).State = Microsoft.EntityFrameworkCore.EntityState.Modified; - - - - // delete old - //await _leaveRequestRepository.DeleteAsync(oldData); - - // save to database - await _leaveRequestRepository.UpdateAsync(oldData); - - // upload document - if (req.LeaveDocument != null) - { - foreach (var d in req.LeaveDocument) - { - var doc = await _minIOService.UploadFileAsync(d); - if (doc != null) - { - // add new record - await _leaveRequestRepository.AddLeaveDocumentAsync(id, new LeaveDocument { Document = doc }); - - //oldData.LeaveDocument.Add(new LeaveDocument { Document = doc }); - //var a = oldData.LeaveDocument.Last(); - //_context.Entry(a).State = Microsoft.EntityFrameworkCore.EntityState.Added; - } - } - } - - // upload draft document - if (req.LeaveDraftDocument != null) - { - var doc = await _minIOService.UploadFileAsync(req.LeaveDraftDocument); + var doc = await _minIOService.UploadFileAsync(d); if (doc != null) { - oldData.LeaveDraftDocument = doc; - _context.Entry(oldData.LeaveDraftDocument).State = Microsoft.EntityFrameworkCore.EntityState.Modified; + oldData.LeaveDocument.Add(new LeaveDocument { Document = doc }); + var a = oldData.LeaveDocument.Last(); + _context.Entry(a).State = Microsoft.EntityFrameworkCore.EntityState.Modified; } - - // save to database - await _leaveRequestRepository.UpdateAsync(oldData); } - - return Success(new { id = oldData.Id }); } - catch (Exception ex) + + // upload draft document + if (req.LeaveDraftDocument != null) { - return Error(ex); + var doc = await _minIOService.UploadFileAsync(req.LeaveDraftDocument); + if (doc != null) + { + oldData.LeaveDraftDocument = doc; + _context.Entry(oldData.LeaveDraftDocument).State = Microsoft.EntityFrameworkCore.EntityState.Modified; + } } + // switch from leave type + switch (leaveType.Code.Trim().ToUpper()) + { + case "LV-004": + { + oldData.WifeDayName = req.WifeDayName ?? ""; + oldData.WifeDayDateBorn = req.WifeDayDateBorn ?? ""; + } + break; + case "LV-005": + { + oldData.RestDayOldTotal = + await _leaveRequestRepository.GetRestDayTotalByYearForUserAsync(userId, thisYear - 1); + oldData.RestDayCurrentTotal = + await _leaveRequestRepository.GetRestDayTotalByYearForUserAsync(userId, thisYear); + } + break; + case "LV-006": + { + oldData.OrdainDayStatus = req.OrdainDayStatus ?? false; + oldData.OrdainDayLocationName = req.OrdainDayLocationName ?? ""; + oldData.OrdainDayLocationAddress = req.OrdainDayLocationAddress ?? ""; + oldData.OrdainDayLocationNumber = req.OrdainDayLocationNumber ?? ""; + if (req.OrdainDayOrdination != null) + oldData.OrdainDayOrdination = req.OrdainDayOrdination.Value; + + oldData.OrdainDayBuddhistLentName = req.OrdainDayBuddhistLentName ?? ""; + + oldData.OrdainDayBuddhistLentAddress = req.OrdainDayBuddhistLentAddress ?? ""; + + oldData.LeaveBirthDate = profile.BirthDate; + oldData.LeaveGovernmentDate = profile.DateStart; + + oldData.HajjDayStatus = req.HajjDayStatus ?? false; + } + break; + case "LV-007": + { + oldData.AbsentDayLocation = req.AbsentDayLocation ?? ""; + oldData.AbsentDaySummon = req.AbsentDaySummon ?? ""; + if (req.AbsentDayRegistorDate != null) + oldData.AbsentDayRegistorDate = req.AbsentDayRegistorDate.Value; + + oldData.AbsentDayGetIn = req.AbsentDayGetIn ?? ""; + + oldData.AbsentDayAt = req.AbsentDayAt ?? ""; + } + break; + case "LV-008": + { + var lastSalary = profile.ProfileSalary; + + oldData.LeaveSalary = lastSalary == null ? 0 : (int)lastSalary.Amount.Value; + oldData.LeaveSalaryText = + lastSalary == null ? "" : ((int)lastSalary.Amount.Value).ToThaiBahtText(false); + oldData.LeaveBirthDate = profile.BirthDate; + oldData.LeaveGovernmentDate = profile.DateStart; + + oldData.StudyDaySubject = req.StudyDaySubject ?? ""; + oldData.StudyDayDegreeLevel = req.StudyDayDegreeLevel ?? ""; + oldData.StudyDayUniversityName = req.StudyDayUniversityName ?? ""; + oldData.StudyDayCountry = req.StudyDayCountry ?? ""; + oldData.StudyDayScholarship = req.StudyDayScholarship ?? ""; + + oldData.StudyDayTrainingSubject = req.StudyDayTrainingSubject ?? ""; + oldData.StudyDayTrainingName = req.StudyDayTrainingName ?? ""; + } + break; + case "LV-010": + { + var lastSalary = profile.ProfileSalary; + + oldData.LeaveSalary = lastSalary == null ? 0 : (int)lastSalary.Amount.Value; + oldData.LeaveSalaryText = + lastSalary == null ? "" : ((int)lastSalary.Amount.Value).ToThaiBahtText(false); + + oldData.CoupleDayName = req.CoupleDayName ?? ""; + oldData.CoupleDayPosition = req.CoupleDayPosition ?? ""; + oldData.CoupleDayLevel = req.CoupleDayLevel ?? ""; + oldData.CoupleDayLevelCountry = req.CoupleDayLevelCountry ?? ""; + oldData.CoupleDayCountryHistory = req.CoupleDayCountryHistory ?? ""; + oldData.CoupleDayTotalHistory = req.CoupleDayTotalHistory ?? ""; + + if (req.CoupleDayStartDateHistory != null) + oldData.CoupleDayStartDateHistory = req.CoupleDayStartDateHistory.Value; + + if (req.CoupleDayEndDateHistory != null) + oldData.CoupleDayEndDateHistory = req.CoupleDayEndDateHistory.Value; + + oldData.CoupleDaySumTotalHistory = req.CoupleDaySumTotalHistory ?? ""; + } + break; + } + + // add dear and oc_data + //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); + //var approver = string.Empty; + //if (rootOc != null) + //{ + // var list = await _commandRepository.GetOrgApproverAsync(rootOc ?? Guid.Empty); + // if (list.Count > 0) + // approver = list.First().Name; + //} + + oldData.LeaveTypeCode = leaveType.Code; + oldData.Dear = profile.Commander ?? ""; + oldData.PositionName = profile.Position == null ? "" : profile.Position; + oldData.PositionLevelName = profile.PosLevel == null ? "" : profile.PosLevel; + oldData.OrganizationName = profile.Oc ?? ""; + + _context.Entry(oldData.Type).State = Microsoft.EntityFrameworkCore.EntityState.Detached; + //_context.Entry(leaveRequest.Type).State = Microsoft.EntityFrameworkCore.EntityState.Modified; + + + + // delete old + //await _leaveRequestRepository.DeleteAsync(oldData); + + // save to database + await _leaveRequestRepository.UpdateAsync(oldData); + + return Success(new { id = oldData.Id }); } @@ -857,17 +697,9 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> GetUserLeaveProfileAsync([FromBody] GetUserLeaveProfileDto req) { var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); + var thisYear = DateTime.Now.Year; - var thisYear = DateTime.Now.Year - 1; - var toDay = DateTime.Now.Date; - var startFiscalDate = new DateTime(DateTime.Now.Year - 1, 10, 1); - var endFiscalDate = new DateTime(DateTime.Now.Year, 9, 30); - - if (toDay >= startFiscalDate && toDay <= endFiscalDate) - thisYear = thisYear + 1; - - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); @@ -882,55 +714,73 @@ namespace BMA.EHR.Leave.Service.Controllers } var leaveLimit = 0.0; + var remainPrev = 0.0; var orgName = ""; - if (profile.Child4 != null && profile.Child4 != "") - orgName += $" {profile.Child4}"; - if (profile.Child3 != null && profile.Child3 != "") - orgName += $" {profile.Child3}"; - if (profile.Child2 != null && profile.Child2 != "") - orgName += $" {profile.Child2}"; if (profile.Child1 != null && profile.Child1 != "") orgName += $" {profile.Child1}"; + if (profile.Child2 != null && profile.Child2 != "") + orgName += $" {profile.Child2}"; + if (profile.Child3 != null && profile.Child3 != "") + orgName += $" {profile.Child3}"; + if (profile.Child4 != null && profile.Child4 != "") + orgName += $" {profile.Child4}"; if (profile.Root != null && profile.Root != "") orgName += $" {profile.Root}"; - var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUserAsync(thisYear, req.Type, userId); + if (leaveType.Code.Trim().ToUpper() == "LV-005") { - // if (profile.IsProbation! == true) - // leaveLimit = 0; - // else + if (govAge >= 180) { - leaveLimit = leaveData == null ? - 10 - : leaveData.LeaveDays; + var leavePrevYear = (await _leaveRequestRepository.GetSumApproveLeaveAsync(thisYear)).Where(x => x.LeaveTypeCode == "LV-005" && x.KeycloakUserId == userId).FirstOrDefault(); + if (govAge >= 3650) + { + leaveLimit = 30 - (leavePrevYear == null ? 0 : leavePrevYear.SumLeaveDay); + remainPrev = 30 - (leavePrevYear == null ? 0 : leavePrevYear.SumLeaveDay); // หายอดวันลาที่เหลือของปีก่อน + if (remainPrev >= 20) remainPrev = 20; + } + else + { + leaveLimit = 20 - (leavePrevYear == null ? 0 : leavePrevYear.SumLeaveDay); + remainPrev = 20 - (leavePrevYear == null ? 0 : leavePrevYear.SumLeaveDay); // หายอดวันลาที่เหลือของปีก่อน + if (remainPrev >= 10) remainPrev = 10; + } + } + else + { + leaveLimit = 0; } } else leaveLimit = leaveType.Limit; - var restOldDay = leaveData == null ? 0 : leaveData.LeaveDays - 10; - var restCurrentDay = 10.0; - // if (profile.IsProbation! == true) - // { - // restOldDay = 0; - // restCurrentDay = 0; - // } - if(restOldDay < 0) - restOldDay = 0; - var sumLeave = leaveData == null ? 0 : leaveData.LeaveDaysUsed; - // var lastSalary = profile.ProfileSalary; + var sumLeave = await _leaveRequestRepository.GetSumLeaveByTypeForUserAsync(userId, req.Type, thisYear); + var restOldDay = 0.00; + if (leaveType.Code.Trim().ToUpper() == "LV-005") + { + restOldDay = remainPrev; + } + else + restOldDay = await _leaveRequestRepository.GetRestDayTotalByYearForUserAsync(userId, thisYear - 1); + + var lastSalary = profile.ProfileSalary; + + //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); + //var approver = profile.Commander ?? ""; + //var userOc = profile.Root ?? ""; + //if (rootOc != null) + //{ + // var list = await _commandRepository.GetOrgApproverAsync(rootOc ?? Guid.Empty); + // if (list.Count > 0) + // approver = list.First().Name; + //} var leaveLast = await _leaveRequestRepository.GetLeaveLastByTypeForUserAsync(userId, req.Type); - - - var leaveDraftSummary = await _leaveRequestRepository.GetSumDraftLeaveTotalByTypeAndRangeForUser2(userId, req.Type, startFiscalDate, endFiscalDate,endFiscalDate.AddDays(1)); - var leaveWaitingSummary = await _leaveRequestRepository.GetSumNewLeaveTotalByTypeAndRangeForUser2(userId, req.Type, startFiscalDate, endFiscalDate,endFiscalDate.AddDays(1)); var result = new GetUserLeaveProfileResultDto { @@ -940,107 +790,31 @@ namespace BMA.EHR.Leave.Service.Controllers FullName = $"{profile.Prefix}{profile.FirstName} {profile.LastName}", Dear = profile.Commander ?? "", - CommanderPosition = profile.CommanderPositionName ?? "", - PositionName = profile.Position == null ? "" : profile.Position, PositionLevelName = profile.PosLevel == null ? "" : profile.PosLevel, OrganizationName = orgName, //profile.Oc ?? "", - LeaveLimit = leaveLimit, // จำนวนวันลาทั้งหมดในปีนั้นๆที่ลาได้ โดยรวมยอดที่เหลือจากปีก่อนมา (เอาค่ามาจากตาราง Beginning เลย) - LeaveTotal = sumLeave ?? 0, // จำนวนวันลาที่ลาไปแล้วในปีนั้นๆ โดยเมื่อมีการอนุมัติลา จะมาบวกค่านี้ไปเรื่อยๆ (เอาค่ามาจากตาราง Beginning เลย) - LeaveRemain = leaveLimit - (sumLeave ?? 0), - RestDayTotalOld = restOldDay, // เอา leaveLimit มาลบ 10 (LV-005) - RestDayTotalCurrent = restCurrentDay,// 10 วันเสมอ (LV-005) + LeaveLimit = leaveLimit, + LeaveTotal = sumLeave, + LeaveRemain = leaveLimit - sumLeave, + RestDayTotalOld = restOldDay, BirthDate = profile.BirthDate.Date, DateAppoint = profile.DateAppoint == null ? null : profile.DateAppoint.Value.Date, - // Salary = lastSalary == null ? 0 : lastSalary.Amount == null ? 0 : (int)lastSalary.Amount.Value, - // SalaryText = lastSalary == null ? "" : lastSalary.Amount == null ? "" : ((int)lastSalary.Amount.Value).ToThaiBahtText(false), - Salary = profile.Amount.HasValue && profile.Amount > 0 - ? (int)profile.Amount : 0, - SalaryText = profile.Amount.HasValue && profile.Amount > 0 - ? ((int)profile.Amount).ToThaiBahtText(false) : "", + Salary = lastSalary == null ? 0 : lastSalary.Amount == null ? 0 : (int)lastSalary.Amount.Value, + SalaryText = lastSalary == null ? "" : lastSalary.Amount == null ? "" : ((int)lastSalary.Amount.Value).ToThaiBahtText(false), LeaveLast = leaveLast == null ? null : leaveLast, - TelephoneNumber = profile.TelephoneNumber ?? "", - CurrentAddress = profile.CurrentAddress ?? "", - CurrentSubDistrict = profile.CurrentSubDistrict ?? "", - CurrentDistrict = profile.CurrentDistrict ?? "", - CurrentProvince = profile.CurrentProvince ?? "", - CurrentZipCode = profile.CurrentZipCode ?? "", - GovAge = govAge, - - LeaveDraftSummary = leaveDraftSummary, - LeaveWaitingSummary = leaveWaitingSummary + TelephoneNumber = profile.TelephoneNumber ?? "-", + CurrentAddress = profile.CurrentAddress ?? "-", + CurrentSubDistrict = profile.CurrentSubDistrict ?? "-", + CurrentDistrict = profile.CurrentDistrict ?? "-", + CurrentProvince = profile.CurrentProvince ?? "-", + CurrentZipCode = profile.CurrentZipCode ?? "-", }; return Success(result); } - [HttpGet("time-check")] - [AllowAnonymous] - public async Task> TimeCheckAsync() - { - var startDate = new DateTime(2017, 1, 6); - var govAge = (startDate).DiffDay(DateTime.Now.Date); - var date1Raw = startDate; - var date1 = new LocalDate(date1Raw.Year, date1Raw.Month, date1Raw.Day); - var date2 = new LocalDate(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); - - - var (govAgeYear, govAgeMonth, govAgeDay) = startDate.GetDifference(DateTime.Now.Date); - - var isLeave = false; - var message = string.Empty; - - if (govAgeYear >= 1 || (govAgeYear == 0 && govAgeMonth >= 6)) - { - isLeave = true; - if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด"; - } - else - { - isLeave = false; - if (!isLeave) message = "อายุราชการน้อยกว่า 6 เดือนหรือ 180 วัน"; - } - - return Success(new - { - GovAge = govAge, - GovAgeDay = govAgeDay, - GovAgeMonth = govAgeMonth, - GovAgeYear = govAgeYear, - IsLeave = isLeave, - Message = message - - - - }); - } - - /// - /// ทดสอบประมวลผล beginning - /// - /// - /// - [HttpGet("process-beginning/{year:int}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - [AllowAnonymous] - public async Task> ProcessBeginningByYearAsync([FromRoute] int year) - { - try - { - await _leaveBeginningRepository.ProcessEarlyLeaveRequest(year); - return Success(); - } - catch (Exception e) - { - return Error(e); - } - } - - /// /// LV2_003 - เช็คการยืนขอลา (USER) /// @@ -1055,23 +829,10 @@ namespace BMA.EHR.Leave.Service.Controllers [ProducesResponseType(StatusCodes.Status500InternalServerError)] public async Task> CheckUserLeaveAsync([FromBody] GetLeaveCheckDto req) { - var totalDay = (double)req.StartLeaveDate.DiffDay(req.EndLeaveDate.Date); - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); var govAge = (profile?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date); - var startDate = profile?.DateStart?.Date ?? DateTime.Now.Date; - // var date1Raw = profile?.DateStart?.Date ?? DateTime.Now.Date; - // var date1 = new LocalDate(date1Raw.Year, date1Raw.Month, date1Raw.Day); - // var date2 = new LocalDate(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); - // Period period = Period.Between(date1, date2); - // var govAgeMonth = period.Months; - // var govAgeYear = period.Years; - - var (govAgeYear, govAgeMonth, govAgeDay) = startDate.GetDifference(DateTime.Now.Date); - var thisYear = DateTime.Now.Year; var message = string.Empty; @@ -1093,74 +854,54 @@ namespace BMA.EHR.Leave.Service.Controllers var sumLeave = await _leaveRequestRepository.GetSumLeaveByTypeForUserAsync(userId, req.Type, req.StartLeaveDate.Year); var sumWorkDay = await _holidayRepository.GetHolidayCountAsync(req.StartLeaveDate.Date, req.EndLeaveDate.Date, category); - + var totalDay = req.StartLeaveDate.DiffDay(req.EndLeaveDate.Date); var sumWeekend = _holidayRepository.GetWeekEndCount(req.StartLeaveDate.Date, req.EndLeaveDate.Date, category); var sumApproveLeave = await _leaveRequestRepository.GetSumApproveLeaveByTypeForUserAsync(userId, req.Type, req.StartLeaveDate.Year); - // อ่านค่าจากตาราง beginning ทั้ง limit และ usage - var fiscalYear = req.StartLeaveDate.Year; - if (req.StartLeaveDate.Date >= new DateTime(DateTime.Now.Year, 10, 1) && req.EndLeaveDate.Date <= new DateTime(DateTime.Now.Year, 12, 31)) - fiscalYear = req.StartLeaveDate.Year + 1; - var sumLeaveDay = await _leaveBeginningRepository.GetByYearAndTypeIdForUserAsync(fiscalYear, req.Type, userId); + + var minLeave = (await _context.Set().Where(x => x.Type.Id == req.Type && + (x.LeaveStatus == "PENDING" || x.LeaveStatus == "APPROVE") && + x.KeycloakUserId == userId) + .OrderBy(x => x.LeaveStartDate) + .FirstOrDefaultAsync()); + + var maxLeave = (await _context.Set().Where(x => x.Type.Id == req.Type && + (x.LeaveStatus == "PENDING" || x.LeaveStatus == "APPROVE") && + x.KeycloakUserId == userId) + .OrderByDescending(x => x.LeaveEndDate) + .FirstOrDefaultAsync()); + var isBetween = false; - var existingLeaves = await _context.Set() - .Where(x => x.Type.Id == req.Type && - (x.LeaveStatus == "PENDING" || x.LeaveStatus == "APPROVE") && - x.KeycloakUserId == userId) - .ToListAsync(); - - isBetween = existingLeaves.Any(leave => - req.StartLeaveDate.Date <= leave.LeaveEndDate.Date && - req.EndLeaveDate.Date >= leave.LeaveStartDate.Date); - - // var minLeave = (await _context.Set().Where(x => x.Type.Id == req.Type && - // (x.LeaveStatus == "PENDING" || x.LeaveStatus == "APPROVE") && - // x.KeycloakUserId == userId) - // .OrderBy(x => x.LeaveStartDate) - // .FirstOrDefaultAsync()); - - // var maxLeave = (await _context.Set().Where(x => x.Type.Id == req.Type && - // (x.LeaveStatus == "PENDING" || x.LeaveStatus == "APPROVE") && - // x.KeycloakUserId == userId) - // .OrderByDescending(x => x.LeaveEndDate) - // .FirstOrDefaultAsync()); - - // var isBetween = false; - // if (minLeave != null && maxLeave != null) - // { - // // isBetween = (req.StartLeaveDate.Date >= minLeave.LeaveStartDate.Date && req.StartLeaveDate.Date <= maxLeave.LeaveEndDate.Date) || - // // (req.EndLeaveDate.Date >= minLeave.LeaveStartDate.Date && req.EndLeaveDate.Date <= maxLeave.LeaveEndDate.Date); - // isBetween = req.StartLeaveDate.Date <= maxLeave.LeaveEndDate.Date && - // req.EndLeaveDate.Date >= minLeave.LeaveStartDate.Date; - - // } + if (minLeave != null && maxLeave != null) + { + isBetween = (req.StartLeaveDate.Date >= minLeave.LeaveStartDate.Date && req.StartLeaveDate.Date <= maxLeave.LeaveEndDate.Date) || + (req.EndLeaveDate.Date >= minLeave.LeaveStartDate.Date && req.EndLeaveDate.Date <= maxLeave.LeaveEndDate.Date); + } var isLeave = false; - var approveDay = sumLeaveDay == null ? 0.0 : sumLeaveDay.LeaveDaysUsed; - var limitDay = sumLeaveDay == null ? 0.0 : sumLeaveDay.LeaveDays; switch (leaveType.Code.ToUpper().Trim()) { case "LV-001": // fix issue : ระบบลา (ขรก.) >> ลาป่วย (กรณียื่นขอลาเกิน 120 วัน/ปี) #828 - - isLeave = (totalDay - (sumWorkDay + sumWeekend) + approveDay) <= 120; + isLeave = (totalDay - (sumWorkDay + sumWeekend) + sumApproveLeave) <= 120; if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด"; //isLeave = true; break; case "LV-002": // fix issue : ระบบลา (ขรก.) >> ลากิจส่วนตัว (กรณียื่นขอลาเกิน 45 วัน/ปี) #829 // fix issue : ระบบลา (ขรก.) >> ลากิจส่วนตัว (กรณีผู้เข้ารับราชการไม่เกิน 1 ปี ยื่นขอลาเกิน 15 วัน/ปี) #831 - if (govAgeYear <= 1) + if (govAge <= 365) { - isLeave = (totalDay - (sumWorkDay + sumWeekend) + approveDay) <= 15; + isLeave = (totalDay - (sumWorkDay + sumWeekend) + sumApproveLeave) <= 15; if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด"; } + else { - isLeave = (totalDay - (sumWorkDay + sumWeekend) + approveDay) <= 45; + isLeave = (totalDay - (sumWorkDay + sumWeekend) + sumApproveLeave) <= 45; if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด"; } @@ -1174,16 +915,33 @@ namespace BMA.EHR.Leave.Service.Controllers if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด"; break; case "LV-004": - isLeave = (totalDay - (sumWorkDay + sumWeekend) + approveDay) <= 15; + isLeave = (totalDay - (sumWorkDay + sumWeekend) + sumApproveLeave) <= 15; if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด"; break; case "LV-005": // fix issue : ระบบลา (ขรก.) >> ลาพักผ่อน (กรณีรับราชการไม่ถึง 6 เดือน) #838 - if (govAgeYear >= 1 || (govAgeYear == 0 && govAgeMonth >= 6)) - { - isLeave = (totalDay - (sumWorkDay + sumWeekend) + approveDay) <= (limitDay); - if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด"; - } + var leavePrevYear = (await _leaveRequestRepository.GetSumApproveLeaveAsync(thisYear - 1)).Where(x => x.LeaveTypeCode == "LV-005" && x.KeycloakUserId == userId).FirstOrDefault(); + //var leavePrevYearRemain = 10 - (leavePrevYear == null ? 0 : leavePrevYear.SumLeaveDay); // หายอดวันลาที่เหลือของปีก่อน + + if (govAge >= 180) + if (govAge >= 3650) + { + // ถ้าอายุราชการเกิน 10 ปี ได้บวกเพิ่มอีก 10 วัน + var leavePrevYearRemain = 30 - (leavePrevYear == null ? 0 : leavePrevYear.SumLeaveDay); // หายอดวันลาที่เหลือของปีก่อน + if (leavePrevYearRemain >= 20) leavePrevYearRemain = 20; + + isLeave = (totalDay - (sumWorkDay + sumWeekend) + sumApproveLeave) <= (10 + leavePrevYearRemain); + if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด"; + } + else + { + var leavePrevYearRemain = 20 - (leavePrevYear == null ? 0 : leavePrevYear.SumLeaveDay); // หายอดวันลาที่เหลือของปีก่อน + if (leavePrevYearRemain >= 10) leavePrevYearRemain = 10; + + isLeave = (totalDay - (sumWorkDay + sumWeekend) + sumApproveLeave) <= (10 + leavePrevYearRemain); + if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด"; + } + else { isLeave = false; @@ -1193,7 +951,7 @@ namespace BMA.EHR.Leave.Service.Controllers break; case "LV-006": // fix issue : ระบบลา(ขรก.) >> ลาอุปสมบทหรือการลาประกอบพิธีฮัจย์ฯ(กรณีรับราชการน้อยกว่า 1 ปี) #840 - if (govAgeYear < 1) + if (govAge < 365) { isLeave = false; if (!isLeave) message = "อายุราชการน้อยกว่า 1 ปีหรือ 365 วัน"; @@ -1207,7 +965,7 @@ namespace BMA.EHR.Leave.Service.Controllers if (prevLeave > 0) { isLeave = false; - if (!isLeave) message = "ไม่สามารถขอลาได้ เนื่องจากเคยยื่นขอลาไปแล้ว"; + if (!isLeave) message = "ไม่สามารถขอลาได้ เนื้่องจากเคยยื่นขอลาไปแล้ว"; } else { @@ -1219,7 +977,7 @@ namespace BMA.EHR.Leave.Service.Controllers break; case "LV-008": case "LV-009": - isLeave = govAgeYear >= 1; + isLeave = govAge >= 365; if (!isLeave) message = "อายุราชการน้อยกว่า 1 ปีหรือ 365 วัน"; break; case "LV-010": @@ -1289,35 +1047,6 @@ namespace BMA.EHR.Leave.Service.Controllers break; } - if (totalDay > 1) - { - if (req.LeaveRange == "MORNING" || req.LeaveRangeEnd == "AFTERNOON") - { - isLeave = false; - message = "ช่วงวันลาที่ระบุไม่ถูกต้อง"; - } - - if (req.LeaveRange != "ALL") - totalDay -= 0.5; - - if (req.LeaveRangeEnd != "ALL") - totalDay -= 0.5; - - } - else if (totalDay == 1) - { - - if (req.LeaveRange != req.LeaveRangeEnd) - { - isLeave = false; - message = "ช่วงวันลาที่ระบุไม่ถูกต้อง"; - } - if (req.LeaveRange != "ALL") - totalDay -= 0.5; - - } - - //var isLeave = sumLeave + (totalDay - sumWorkDay - sumWeekend) <= leaveType.Limit; var result = new GetLeaveCheckResultDto @@ -1334,7 +1063,7 @@ namespace BMA.EHR.Leave.Service.Controllers /// - /// LV2_004 - รายการลา Calendar (USER) + /// LV2_004 - รายการลา Calendar (USER/ADMIN) /// /// /// @@ -1348,17 +1077,19 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> GetLeaveRequestCalendarAsync( [FromBody] GetLeaveRequestCalendarDto req) { - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var data = await _leaveRequestRepository.GetLeaveRequestByYearAsync(req.Year, userId); + //var thisYear = DateTime.Now.Year; + var data = await _leaveRequestRepository.GetLeaveRequestByYearAsync(req.Year); + + // var profileList = await _userProfileRepository.GetProfileWithKeycloak(AccessToken); var resultData = (from d in data - //join p in profileList on d.KeycloakUserId equals p.Keycloak + //join p in profileList on d.KeycloakUserId equals p.Keycloak select new GetLeaveRequestCalendarResultDto { Id = d.Id, LeaveTypeId = d.Type.Id, LeaveTypeName = d.Type.Name, - DateSendLeave = d.DateSendLeave != null ? d.DateSendLeave.Value.Date : d.CreatedAt.Date, + DateSendLeave = d.CreatedAt.Date, Status = d.LeaveStatus, FullName = $"{d.Prefix}{d.FirstName} {d.LastName}", LeaveEndDate = d.LeaveEndDate, @@ -1369,166 +1100,38 @@ namespace BMA.EHR.Leave.Service.Controllers .ToList(); return Success(resultData); - } - /// - /// LV2_004 - รายการลา Calendar (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("admin/calendar")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetLeaveRequestCalendarAdminAsync( - [FromBody] GetLeaveRequestCalendarDto req) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("LIST", "SYS_LEAVE_LIST"); - //var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - //string role = jsonData["result"]?.ToString(); - string role = jsonData.result.privilege; - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - var data = await _leaveRequestRepository.GetLeaveRequestByYearForAdminAsync(req.Year, role, nodeId, profileAdmin.Node); + //var personList = new List(); + //var result = new List(); - // ถ้ามีการรักษาการ - if (jsonData.result.isAct) - { - var posActs = jsonData.result.posMasterActs.Where(x => x.privilege != "EMPTY"); - foreach(var act in posActs) - { - var actRole = act.privilege; - string actNodeId = string.Empty; - int? actNode = null; + //foreach (var item in data) + //{ + // var profile = personList.FirstOrDefault(x => x.Keycloak == item.KeycloakUserId); + // if (profile == null) + // { + // profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(item.KeycloakUserId, AccessToken); + // personList.Add(profile); + // } + // //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(item.KeycloakUserId, AccessToken); - if (actRole == "NORMAL" || actRole == "CHILD") - { - actNodeId = act.child4DnaId != null ? - act.child4DnaId.Value.ToString("D") : - act.child3DnaId != null ? - act.child3DnaId.Value.ToString("D") : - act.child2DnaId != null ? - act.child2DnaId.Value.ToString("D") : - act.child1DnaId != null ? - act.child1DnaId.Value.ToString("D") : - act.rootDnaId != null ? - act.rootDnaId.Value.ToString("D") : - ""; - actNode = act.child4DnaId != null ? - 4 : - act.child3DnaId != null ? - 3 : - act.child2DnaId != null ? - 2 : - act.child1DnaId != null ? - 1 : - act.rootDnaId != null ? - 0 : - null; - } - else if (actRole == "BROTHER") - { - actNodeId = act.child4DnaId != null ? - act.child3DnaId.Value.ToString("D") : - act.child3DnaId != null ? - act.child2DnaId.Value.ToString("D") : - act.child2DnaId != null ? - act.child1DnaId!.Value.ToString("D") : - act.child1DnaId != null ? - act.rootDnaId.Value.ToString("D") : - act.rootDnaId != null ? - act.rootDnaId.Value.ToString("D") : - ""; - actNode = act.child4DnaId != null ? - 4 : - act.child3DnaId != null ? - 3 : - act.child2DnaId != null ? - 2 : - act.child1DnaId != null ? - 1 : - act.rootDnaId != null ? - 0 : - null; - } - else if (actRole == "ROOT" /*|| role == "PARENT"*/) - { - actNodeId = act.rootDnaId!.Value.ToString("D"); - actNode = 0; - } + // var resData = new GetLeaveRequestCalendarResultDto + // { + // Id = item.Id, + // LeaveTypeName = item.Type.Name, + // LeaveTypeId = item.Type.Id, + // DateSendLeave = item.CreatedAt.Date, + // Status = item.LeaveStatus, + // FullName = $"{profile.Prefix}{profile.FirstName} {profile.LastName}", + // LeaveStartDate = item.LeaveStartDate, + // LeaveEndDate = item.LeaveEndDate, + // KeycloakId = item.KeycloakUserId + // }; - var rawDataAct = await _leaveRequestRepository.GetLeaveRequestByYearForAdminAsync(req.Year, actRole, actNodeId, actNode); - if (rawDataAct != null) - { - if (data != null) - data = data.Union(rawDataAct).DistinctBy(x => x.Id).ToList(); - else - data = rawDataAct; - } - } - } - + // result.Add(resData); + //} - - - var resultData = (from d in data - //join p in profileList on d.KeycloakUserId equals p.Keycloak - select new GetLeaveRequestCalendarResultDto - { - Id = d.Id, - LeaveTypeId = d.Type.Id, - LeaveTypeName = d.Type.Name, - DateSendLeave = d.DateSendLeave != null ? d.DateSendLeave.Value.Date : d.CreatedAt.Date, - Status = d.LeaveStatus, - FullName = $"{d.Prefix}{d.FirstName} {d.LastName}", - LeaveEndDate = d.LeaveEndDate, - LeaveStartDate = d.LeaveStartDate, - KeycloakId = d.KeycloakUserId, - LeaveTotal = d.LeaveTotal - - }) - .ToList(); - - return Success(resultData); + //return Success(result); } /// @@ -1554,8 +1157,6 @@ namespace BMA.EHR.Leave.Service.Controllers // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); // } - - var rawData = await _leaveRequestRepository.GetLeaveRequestByUserIdAsync(userId, req.Year, req.Type, req.Status); @@ -1568,16 +1169,13 @@ namespace BMA.EHR.Leave.Service.Controllers Id = item.Id, LeaveTypeId = item.Type.Id, LeaveTypeName = item.Type.Name, - LeaveSubTypeName = item.LeaveSubTypeName ?? "", FullName = $"{item.Prefix}{item.FirstName} {item.LastName}", - DateSendLeave = item.DateSendLeave ?? item.CreatedAt, + DateSendLeave = item.CreatedAt.Date, IsDelete = item.LeaveStatus == "DELETE", Status = item.LeaveStatus, LeaveStartDate = item.LeaveStartDate, LeaveEndDate = item.LeaveEndDate, HajjDayStatus = item.HajjDayStatus, - LeaveRange = item.LeaveRange, - LeaveRangeEnd = item.LeaveRangeEnd, }; result.Add(res); } @@ -1585,84 +1183,6 @@ namespace BMA.EHR.Leave.Service.Controllers if (req.Keyword != "") result = result.Where(x => x.FullName.Contains(req.Keyword)).ToList(); - if (!string.IsNullOrEmpty(req.SortBy)) - { - var sort = req.SortBy; - - if (sort == "leaveTypeName") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.LeaveTypeName).ToList() - : result.OrderBy(x => x.LeaveTypeName).ToList(); - } - else if (sort == "leaveSubTypeName") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.LeaveSubTypeName).ToList() - : result.OrderBy(x => x.LeaveSubTypeName).ToList(); - } - else if (sort == "fullName") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.FullName).ToList() - : result.OrderBy(x => x.FullName).ToList(); - } - else if (sort == "dateSendLeave") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.DateSendLeave).ToList() - : result.OrderBy(x => x.DateSendLeave).ToList(); - } - else if (sort == "isDelete") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.IsDelete).ToList() - : result.OrderBy(x => x.IsDelete).ToList(); - } - else if (sort == "status") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.Status).ToList() - : result.OrderBy(x => x.Status).ToList(); - } - else if (sort == "leaveStartDate") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.LeaveStartDate).ToList() - : result.OrderBy(x => x.LeaveStartDate).ToList(); - } - else if (sort == "leaveEndDate") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.LeaveEndDate).ToList() - : result.OrderBy(x => x.LeaveEndDate).ToList(); - } - else if (sort == "hajjDayStatus") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.HajjDayStatus).ToList() - : result.OrderBy(x => x.HajjDayStatus).ToList(); - } - else if (sort == "leaveRange") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.LeaveRange).ToList() - : result.OrderBy(x => x.LeaveRange).ToList(); - } - else if (sort == "leaveRangeEnd") - { - result = req.Descending.GetValueOrDefault() - ? result.OrderByDescending(x => x.LeaveRangeEnd).ToList() - : result.OrderBy(x => x.LeaveRangeEnd).ToList(); - } - else - { - // default กรณีส่ง sortBy มาไม่ตรง - result = result.OrderByDescending(x => x.DateSendLeave).ToList(); - } - } - - var pageResult = result.Skip((req.Page - 1) * req.PageSize).Take(req.PageSize).ToList(); return Success(new { data = pageResult, total = result.Count }); @@ -1685,78 +1205,53 @@ namespace BMA.EHR.Leave.Service.Controllers var rawData = await _leaveRequestRepository.GetByIdAsync(id); var thisYear = DateTime.Now.Year; - if (rawData == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } - var fiscalYear = rawData.LeaveStartDate.Month >= 10 ? rawData.LeaveStartDate.Year + 1 : rawData.LeaveStartDate.Year; - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(rawData.KeycloakUserId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken); if (profile == null) { return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } - var govAge = (profile?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date); - var userCalendar = await _userCalendarRepository.GetExist(profile.Id); var category = userCalendar == null ? "NORMAL" : userCalendar.Calendar; - // var lastSalary = profile.ProfileSalary; - // var lastSalaryAmount = lastSalary == null ? 0 : lastSalary.Amount ?? 0; + var lastSalary = profile.ProfileSalary; + var lastSalaryAmount = lastSalary == null ? 0 : lastSalary.Amount ?? 0; var lastLeaveRequest = await _leaveRequestRepository.GetLastLeaveRequestByTypeForUserAsync(rawData.KeycloakUserId, - rawData.Type.Id, rawData.LeaveStartDate.Date); + rawData.Type.Id); var sumLeave = rawData.LeaveStartDate.DiffDay(rawData.LeaveEndDate); var sumHoliday = await _holidayRepository.GetHolidayCountAsync(rawData.LeaveStartDate, rawData.LeaveEndDate, category); var sumWeekend = _holidayRepository.GetWeekEndCount(rawData.LeaveStartDate, rawData.LeaveEndDate, category); - var orgName = ""; - if (rawData.Child4 != null && rawData.Child4 != "") - orgName += $" {rawData.Child4}"; - if (rawData.Child3 != null && rawData.Child3 != "") - orgName += $" {rawData.Child3}"; - if (rawData.Child2 != null && rawData.Child2 != "") - orgName += $" {rawData.Child2}"; + var orgName = rawData.Root ?? ""; if (rawData.Child1 != null && rawData.Child1 != "") - orgName += $" {rawData.Child1}"; - if (rawData.Root != null && rawData.Root != "") - orgName += $" {rawData.Root}"; + orgName += $"/{rawData.Child1}"; + if (rawData.Child2 != null && rawData.Child2 != "") + orgName += $"/{rawData.Child2}"; + if (rawData.Child3 != null && rawData.Child3 != "") + orgName += $"/{rawData.Child3}"; + if (rawData.Child4 != null && rawData.Child4 != "") + orgName += $"/{rawData.Child4}"; - - var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUserAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId); - - var restDayOld = 0.0; - - //restDayOld = govAge < 180 ? 0 : leaveData == null ? 0 : (leaveData.LeaveDays + leaveData.BeginningLeaveDays - 10); - - - - restDayOld = govAge < 180 ? 0 : leaveData == null ? 0 : (leaveData.LeaveDays - 10); - if (restDayOld < 0) restDayOld = 0; - var restDayCurrent = govAge < 180 ? 0 : 10; - - if (thisYear < fiscalYear) - restDayOld = 0; - var result = new GetLeaveRequestByIdDto { Id = rawData.Id, - LeaveRange = rawData.LeaveRange ?? "ALL", - LeaveRangeEnd = rawData.LeaveRangeEnd ?? "ALL", + LeaveRange = rawData.LeaveRange ?? "", LeaveTypeName = rawData.Type.Name, - LeaveSubTypeName = rawData.LeaveSubTypeName, LeaveTypeId = rawData.Type.Id, FullName = $"{rawData.Prefix}{rawData.FirstName} {rawData.LastName}", - DateSendLeave = rawData.DateSendLeave ?? rawData.CreatedAt, + DateSendLeave = rawData.CreatedAt, Status = rawData.LeaveStatus, LeaveStartDate = rawData.LeaveStartDate, LeaveEndDate = rawData.LeaveEndDate, @@ -1782,23 +1277,13 @@ namespace BMA.EHR.Leave.Service.Controllers LeaveBirthDate = profile.BirthDate, LeaveGovernmentDate = profile.DateAppoint == null ? null : profile.DateAppoint.Value, - // LeaveSalary = lastSalary == null ? 0 : lastSalaryAmount, - // LeaveSalaryText = lastSalary == null ? "" : ((int)lastSalaryAmount).ToThaiBahtText(false), - LeaveSalary = profile.Amount.HasValue && profile.Amount > 0 - ? (int)profile.Amount : 0, - LeaveSalaryText = profile.Amount.HasValue && profile.Amount > 0 - ? ((int)profile.Amount).ToThaiBahtText(false) : "", + LeaveSalary = lastSalary == null ? 0 : lastSalaryAmount, + LeaveSalaryText = lastSalary == null ? "" : ((int)lastSalaryAmount).ToThaiBahtText(false), WifeDayName = rawData.WifeDayName, WifeDayDateBorn = rawData.WifeDayDateBorn, - - RestDayOldTotal = restDayOld, - RestDayCurrentTotal = restDayCurrent, - - //RestDayOldTotal = rawData.RestDayOldTotal, - //RestDayCurrentTotal = rawData.RestDayCurrentTotal, - - + RestDayOldTotal = rawData.RestDayOldTotal, + RestDayCurrentTotal = rawData.RestDayCurrentTotal, OrdainDayStatus = rawData.OrdainDayStatus, OrdainDayLocationName = rawData.OrdainDayLocationName, OrdainDayLocationAddress = rawData.OrdainDayLocationAddress, @@ -1833,7 +1318,6 @@ namespace BMA.EHR.Leave.Service.Controllers CoupleDaySumTotalHistory = rawData.CoupleDaySumTotalHistory, Dear = rawData.Dear ?? "", - CommanderPosition = rawData.CommanderPosition ?? "", PositionName = rawData.PositionName ?? "", PositionLevelName = rawData.PositionLevelName ?? "", OrganizationName = orgName, @@ -1876,128 +1360,13 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> GetLeaveRequestForAdminAsync( [FromBody] GetLeaveRequestForAdminDto req) { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("LIST", "SYS_LEAVE_LIST"); - //var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData!.status != 200) + var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_LEAVE_LIST"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") { - return Error(jsonData.message, StatusCodes.Status403Forbidden); + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - //string role = jsonData["result"]?.ToString(); - string role = jsonData.result.privilege; - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var rawData = await _leaveRequestRepository.GetListLeaveRequestForAdminAsync(req.Year, req.Type, req.Status, req.StartDate, req.EndDate, role, nodeId, profileAdmin?.Node); - - - // ถ้ามีการรักษาการ - if (jsonData.result.isAct) - { - var posActs = jsonData.result.posMasterActs.Where(x => x.privilege != "EMPTY"); - foreach(var act in posActs) - { - var actRole = act.privilege; - string actNodeId = string.Empty; - int? actNode = null; - - if (actRole == "NORMAL" || actRole == "CHILD") - { - actNodeId = act.child4DnaId != null ? - act.child4DnaId.Value.ToString("D") : - act.child3DnaId != null ? - act.child3DnaId.Value.ToString("D") : - act.child2DnaId != null ? - act.child2DnaId.Value.ToString("D") : - act.child1DnaId != null ? - act.child1DnaId.Value.ToString("D") : - act.rootDnaId != null ? - act.rootDnaId.Value.ToString("D") : - ""; - actNode = act.child4DnaId != null ? - 4 : - act.child3DnaId != null ? - 3 : - act.child2DnaId != null ? - 2 : - act.child1DnaId != null ? - 1 : - act.rootDnaId != null ? - 0 : - null; - } - else if (actRole == "BROTHER") - { - actNodeId = act.child4DnaId != null ? - act.child3DnaId.Value.ToString("D") : - act.child3DnaId != null ? - act.child2DnaId.Value.ToString("D") : - act.child2DnaId != null ? - act.child1DnaId!.Value.ToString("D") : - act.child1DnaId != null ? - act.rootDnaId.Value.ToString("D") : - act.rootDnaId != null ? - act.rootDnaId.Value.ToString("D") : - ""; - actNode = act.child4DnaId != null ? - 4 : - act.child3DnaId != null ? - 3 : - act.child2DnaId != null ? - 2 : - act.child1DnaId != null ? - 1 : - act.rootDnaId != null ? - 0 : - null; - } - else if (actRole == "ROOT" /*|| role == "PARENT"*/) - { - actNodeId = act.rootDnaId!.Value.ToString("D"); - actNode = 0; - } - - var rawDataAct = await _leaveRequestRepository.GetListLeaveRequestForAdminAsync(req.Year, req.Type, req.Status, req.StartDate, req.EndDate, actRole, actNodeId, actNode); - if (rawDataAct != null) - { - if (rawData != null) - rawData = rawData.Union(rawDataAct).DistinctBy(x => x.Id).ToList(); - else - rawData = rawDataAct; - } - } - } - + var rawData = await _leaveRequestRepository.GetLeaveRequestForAdminAsync(req.Year, req.Type, req.Status, req.StartDate, req.EndDate); var result = new List(); @@ -2028,10 +1397,9 @@ namespace BMA.EHR.Leave.Service.Controllers Id = item.Id, LeaveTypeId = item.Type.Id, LeaveTypeName = item.Type.Name, - LeaveSubTypeName = item.LeaveSubTypeName, FullName = $"{item.Prefix}{item.FirstName} {item.LastName}", ProfileType = item.ProfileType ?? "-", - DateSendLeave = item.DateSendLeave ?? item.CreatedAt, + DateSendLeave = item.CreatedAt, Status = item.LeaveStatus, CitizenId = item.CitizenId ?? "", LeaveStartDate = item.LeaveStartDate, @@ -2041,9 +1409,7 @@ namespace BMA.EHR.Leave.Service.Controllers Agency = agency_name,//agency == null ? "" : agency.Name, Org = item.Root ?? "",//userOc == null ? "-" : userOc.Root, LeaveRange = item.LeaveRange ?? "ALL", - LeaveRangeEnd = item.LeaveRangeEnd ?? "ALL", HajjDayStatus = item.HajjDayStatus, - LeaveTotal = item.LeaveTotal }; result.Add(res); @@ -2081,17 +1447,8 @@ namespace BMA.EHR.Leave.Service.Controllers return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(data.KeycloakUserId, AccessToken); - if (profile == null) - { - return Error(GlobalMessages.ProfileNotFound, StatusCodes.Status404NotFound); - } - // change status to delete - // แก้จาก DELETE เป็น DELETING ไว้ก่อน รอ approve ค่อยเปลี่ยนเป็น DELETE - // data.LeaveStatus = "DELETE"; - - data.LeaveStatus = "DELETING"; + data.LeaveStatus = "DELETE"; data.CancelLeaveWrote = req.LeaveWrote ?? ""; @@ -2105,7 +1462,7 @@ namespace BMA.EHR.Leave.Service.Controllers } else { - data = await _leaveRequestRepository.ApproveCancelLeaveRequestAsync(data, "อนุมัติการขอยกเลิกการลา โดยระบบ", req.Reason ?? ""); + data = await _leaveRequestRepository.ApproveCancelLeaveRequestAsync(data, "อนุมัติการขอยกเลิกการลา โดยระบบ"); } // upload leave cancel document @@ -2121,87 +1478,6 @@ namespace BMA.EHR.Leave.Service.Controllers // save to database await _leaveRequestRepository.UpdateWithTrackingAsync(data); - // TODO: Send notification to all users who need to approve the cancel leave request - var approvers = data.Approvers - //.Where(x => x.ApproveStatus!.ToUpper() == "PENDING") - .OrderBy(x => x.Seq) - .ToList(); - - foreach (var approver in approvers) - { - // Send Notification - var noti1 = new Notification - { - Body = $"คำร้องขอยกเลิกการลาของคุณ {data.FirstName} {data.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = approver!.ProfileId, - Type = "", - Payload = $"{URL}/leave-reject/detail/{id}", - }; - _appDbContext.Set().Add(noti1); - } - - // Get Officer List - var officers = await _userProfileRepository.GetOCStaffAsync(profile.Id, AccessToken); - var approverProfileIdList = approvers.Select(x => x.ProfileId).ToList(); - - if(officers != null && officers.Count > 0) - { - officers = officers.Where(x => !approverProfileIdList.Contains(x.ProfileId)).ToList(); - foreach (var officer in officers) - { - // Send Notification - var noti = new Notification - { - Body = $"คำร้องขอยกเลิกการลาของคุณ {data.FirstName} {data.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = officer.ProfileId, - Type = "", - Payload = $"{URL}/leave-reject/detail/{id}", - }; - _appDbContext.Set().Add(noti); - } - await _appDbContext.SaveChangesAsync(); - } - - - return Success(); - } - - /// - /// API ลบรายการการลา (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> DeleteLeaveRequestForAdminAsync(Guid id) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("DELETE", "SYS_LEAVE_LIST"); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - // ตรวจสอบว่า role ต้องเป็น OWNER เท่านั้น - if (jsonData.result.privilege != "OWNER") - { - return Error("ไม่มีสิทธิ์ในการลบรายการขอลา", StatusCodes.Status403Forbidden); - } - - var deleted = await _leaveRequestRepository.GetByIdAsync(id); - if (deleted == null) - return Error(GlobalMessages.DataNotFound); - - // ห้ามลบเฉพาะสถานะ APPROVE, DELETING, DELETE - if (new[] { "APPROVE", "DELETING", "DELETE" }.Contains(deleted.LeaveStatus)) - { - return Error("ไม่สามารถลบรายการขอลาสถานะนี้ได้"); - } - - await _leaveRequestRepository.DeleteAsync(deleted); return Success(); } @@ -2220,164 +1496,34 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> GetCancelLeaveRequestForAdminAsync( [FromBody] GetLeaveRequestForAdminDto req) { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("LIST", "SYS_LEAVE_LIST"); - //var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - //string role = jsonData["result"]?.ToString(); - string role = jsonData.result.privilege; - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - var rawData = - await _leaveRequestRepository.GetCancelLeaveRequestForAdminAsync(req.Year, req.Type, req.Status, role, nodeId, profileAdmin?.Node); - - // ถ้ามีการรักษาการ - if (jsonData.result.isAct) - { - var posActs = jsonData.result.posMasterActs.Where(x => x.privilege != "EMPTY"); - foreach(var act in posActs) - { - var actRole = act.privilege; - string actNodeId = string.Empty; - int? actNode = null; - - if (actRole == "NORMAL" || actRole == "CHILD") - { - actNodeId = act.child4DnaId != null ? - act.child4DnaId.Value.ToString("D") : - act.child3DnaId != null ? - act.child3DnaId.Value.ToString("D") : - act.child2DnaId != null ? - act.child2DnaId.Value.ToString("D") : - act.child1DnaId != null ? - act.child1DnaId.Value.ToString("D") : - act.rootDnaId != null ? - act.rootDnaId.Value.ToString("D") : - ""; - actNode = act.child4DnaId != null ? - 4 : - act.child3DnaId != null ? - 3 : - act.child2DnaId != null ? - 2 : - act.child1DnaId != null ? - 1 : - act.rootDnaId != null ? - 0 : - null; - } - else if (actRole == "BROTHER") - { - actNodeId = act.child4DnaId != null ? - act.child3DnaId.Value.ToString("D") : - act.child3DnaId != null ? - act.child2DnaId.Value.ToString("D") : - act.child2DnaId != null ? - act.child1DnaId!.Value.ToString("D") : - act.child1DnaId != null ? - act.rootDnaId.Value.ToString("D") : - act.rootDnaId != null ? - act.rootDnaId.Value.ToString("D") : - ""; - actNode = act.child4DnaId != null ? - 4 : - act.child3DnaId != null ? - 3 : - act.child2DnaId != null ? - 2 : - act.child1DnaId != null ? - 1 : - act.rootDnaId != null ? - 0 : - null; - } - else if (actRole == "ROOT" /*|| role == "PARENT"*/) - { - actNodeId = act.rootDnaId!.Value.ToString("D"); - actNode = 0; - } - - var rawDataAct = await _leaveRequestRepository.GetCancelLeaveRequestForAdminAsync(req.Year, req.Type, req.Status, actRole, actNodeId, actNode); - if (rawDataAct != null) - { - if (rawData != null) - rawData = rawData.Union(rawDataAct).DistinctBy(x => x.Id).ToList(); - else - rawData = rawDataAct; - } - } - } - - - var recCount = rawData.Count; - - if (req.Keyword != "") - rawData = rawData.Where(x => ($"{x.Prefix}{x.FirstName} {x.LastName}").Contains(req.Keyword)).ToList(); - if (!string.IsNullOrEmpty(req.ProfileType) && req.ProfileType.ToUpper() != "ALL") - rawData = rawData.Where(x => x.ProfileType.ToUpper().Contains(req.ProfileType.ToUpper())).ToList(); - - rawData = rawData.Skip((req.Page - 1) * req.PageSize).Take(req.PageSize).ToList(); + await _leaveRequestRepository.GetCancelLeaveRequestForAdminAsync(req.Year, req.Type, req.Status); var result = new List(); foreach (var item in rawData) { - //var profile = await _userProfileRepository.GetProfileByKeycloakIdNewAsync(item.KeycloakUserId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(item.KeycloakUserId, AccessToken); var res = new GetLeaveCancelRequestResultDto { Id = item.Id, LeaveTypeId = item.Type.Id, LeaveTypeName = item.Type.Name, - LeaveSubTypeName = item.LeaveSubTypeName, ProfileType = item.ProfileType ?? "-", FullName = $"{item.Prefix}{item.FirstName} {item.LastName}", - DateSendLeave = item.DateSendLeave != null ? item.DateSendLeave.Value.Date : item.CreatedAt.Date, + DateSendLeave = item.CreatedAt.Date, Status = item.LeaveCancelStatus ?? "" }; result.Add(res); } - // if (req.Keyword != "") - // result = result.Where(x => x.FullName.Contains(req.Keyword)).ToList(); - // if (!string.IsNullOrEmpty(req.ProfileType) && req.ProfileType.ToUpper() != "ALL") - // result = result.Where(x => x.ProfileType.ToUpper().Contains(req.ProfileType.ToUpper())).ToList(); - // var pageResult = result.Skip((req.Page - 1) * req.PageSize).Take(req.PageSize).ToList(); + if (req.Keyword != "") + result = result.Where(x => x.FullName.Contains(req.Keyword)).ToList(); + if (!string.IsNullOrEmpty(req.ProfileType) && req.ProfileType.ToUpper() != "ALL") + result = result.Where(x => x.ProfileType.ToUpper().Contains(req.ProfileType.ToUpper())).ToList(); + var pageResult = result.Skip((req.Page - 1) * req.PageSize).Take(req.PageSize).ToList(); - return Success(new { data = result, total = recCount }); + return Success(new { data = pageResult, total = result.Count }); } @@ -2404,18 +1550,17 @@ namespace BMA.EHR.Leave.Service.Controllers return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); } - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken); - // if (profile == null) - // { - // return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - // } + if (profile == null) + { + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + } var result = new GetCancelLeaveRequestByIdDto { Id = rawData.Id, LeaveTypeName = rawData.Type.Name, - LeaveSubTypeName = rawData.LeaveSubTypeName, FullName = $"{rawData.Prefix}{rawData.FirstName} {rawData.LastName}", Status = rawData.LeaveCancelStatus ?? "", LeaveStartDate = rawData.LeaveStartDate, @@ -2429,87 +1574,11 @@ namespace BMA.EHR.Leave.Service.Controllers : await _minIOService.ImagesPath(rawData.LeaveCancelDocument.Id), LeaveReasonDelete = rawData.LeaveCancelComment ?? "", LeaveTotal = rawData.LeaveTotal, - - - LeaveDirectorComment = rawData.LeaveDirectorComment, - LeaveRange = rawData.LeaveRange, - LeaveRangeEnd = rawData.LeaveRangeEnd, }; return Success(result); } - - /// - /// เพิ่มชื่อผู้ส่งไปพิจารณา (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/sender/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> SenderLeaveRequestAsync(Guid id) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_LEAVE_LIST"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - - // var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(Guid.Parse(UserId!), AccessToken); - var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(Guid.Parse(UserId!), AccessToken); - - if (profile == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var rawData = await _leaveRequestRepository.GetByIdAsync(id); - - if (rawData == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var sender = rawData.Approvers - .Where(x => x.ApproveType!.ToUpper() == "SENDER") - .FirstOrDefault(); - - if (sender == null) - { - await _leaveRequestRepository.AddApproversAsync(id, new List - { - new LeaveRequestApprover - { - Prefix = profile.Prefix ?? "", - FirstName = profile.FirstName ?? "", - LastName = profile.LastName ?? "", - PositionName = $"{profile.Position ?? ""}", - ProfileId = profile.Id, - KeycloakId = Guid.Parse(UserId!), - ApproveType = "SENDER", - PositionLevelName = profile.PositionLeaveName ?? "", - PosExecutiveName = profile.PosExecutiveName ?? "", - OrganizationName = profile.Oc ?? "", - - CreatedFullName = FullName ?? "", - CreatedUserId = UserId!, - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "", - LastUpdateUserId = UserId!, - LastUpdatedAt = DateTime.Now, - } - }); - } - - return Success(); - } - /// /// LV2_018 - ผู้มีอำนาจอนุมัติขอยกเลิกการลา(ADMIN) /// @@ -2603,57 +1672,15 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> CommanderApproveLeaveRequestAsync(Guid id, [FromBody] LeaveRequestApproveDto req) { - try + var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_LEAVE_LIST"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_LEAVE_LIST"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - await _leaveRequestRepository.CommanderApproveLeaveRequest(id, req.Reason ?? ""); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// ผู้บังคับบัญชาไม่อนุมัติการลา(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/reject/comander/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CommanderRejectLeaveRequestAsync(Guid id, - [FromBody] LeaveRequestApproveDto req) - { - try - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_LEAVE_LIST"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - await _leaveRequestRepository.CommanderRejectLeaveRequest(id, req.Reason ?? ""); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } + await _leaveRequestRepository.CommanderApproveLeaveRequest(id, req.Reason ?? ""); + return Success(); } /// @@ -2671,23 +1698,15 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> ApproveLeaveRequestAsync(Guid id, [FromBody] LeaveRequestApproveDto req) { - try + var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_LEAVE_LIST"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_LEAVE_LIST"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - await _leaveRequestRepository.ApproveLeaveRequest(id, req.Reason ?? ""); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } + await _leaveRequestRepository.ApproveLeaveRequest(id, req.Reason ?? ""); + return Success(); } /// @@ -2705,77 +1724,48 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> SendLeaveRequestAsync(Guid id, [FromBody] LeaveRequestApproveDto req) { - try + await _leaveRequestRepository.SendToOfficerAsync(id); + + var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); + if (profile == null) { - await _leaveRequestRepository.SendToOfficerAsync(id); - - // Remove Workflow Integration - var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - if (profile == null) + return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); + } + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/workflow/add-workflow"; + if (profile.ProfileType == "OFFICER") + { + using (var client = new HttpClient()) { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - // Get Officer List - var officers = await _userProfileRepository.GetOCStaffAsync(profile.Id, AccessToken); - if(officers != null && officers.Count > 0) - { - foreach (var officer in officers) + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new { - // Send Notification - var noti = new Notification - { - Body = $"มีคำร้องขอลาจาก {profile.Prefix}{profile.FirstName} {profile.LastName} รอรับการอนุมัติจากคุณ", - ReceiverUserId = officer.ProfileId, - Type = "", - Payload = $"{URL}/leave/detail/{id}", - }; - _appDbContext.Set().Add(noti); - } - await _appDbContext.SaveChangesAsync(); + refId = id, + sysName = "SYS_LEAVE_LIST", + posLevelName = profile.PosLevel ?? "", + posTypeName = profile.PosType ?? "", + }); } - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/workflow/add-workflow"; - // if (profile.ProfileType == "OFFICER") - // { - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // refId = id, - // sysName = "SYS_LEAVE_LIST", - // posLevelName = profile.PosLevel ?? "", - // posTypeName = profile.PosType ?? "", - // fullName = $"{profile.Prefix}{profile.FirstName} {profile.LastName}" - // }); - // } - // } - // else - // { - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // refId = id, - // sysName = "SYS_LEAVE_LIST_EMP", - // posLevelName = profile.PosLevel ?? "", - // posTypeName = profile.PosType ?? "", - // fullName = $"{profile.Prefix}{profile.FirstName} {profile.LastName}" - // }); - // } - // } - - return Success(); } - catch (Exception ex) + else { - return Error(ex); + using (var client = new HttpClient()) + { + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + refId = id, + sysName = "SYS_LEAVE_LIST_EMP", + posLevelName = "EMP", + posTypeName = "EMP", + }); + } } + + return Success(); } /// @@ -2793,23 +1783,15 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> RejectLeaveRequestAsync(Guid id, [FromBody] LeaveRequestApproveDto req) { - try + var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_LEAVE_LIST"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_LEAVE_LIST"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - await _leaveRequestRepository.RejectLeaveRequest(id, req.Reason ?? ""); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } + await _leaveRequestRepository.RejectLeaveRequest(id, req.Reason ?? ""); + return Success(); } /// @@ -2856,12 +1838,7 @@ namespace BMA.EHR.Leave.Service.Controllers } } } - var thisYear = rawData.LeaveStartDate.Year; - var toDay = rawData.LeaveStartDate.Date; - // var thisYear = DateTime.Now.Year; - // var toDay = DateTime.Now.Date; - if (toDay >= new DateTime(toDay.Year, 10, 1) && toDay <= new DateTime(toDay.Year, 12, 31)) - thisYear = thisYear + 1; + var thisYear = DateTime.Now.Year; //var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(rawData.KeycloakUserId, AccessToken); @@ -2877,8 +1854,8 @@ namespace BMA.EHR.Leave.Service.Controllers //var lastSalaryAmount = lastSalary == null ? 0 : lastSalary.Amount ?? 0; var lastLeaveRequest = - await _leaveRequestRepository.GetLastLeaveRequestByTypeForUserAsync2(rawData.KeycloakUserId, - rawData.Type.Id, rawData.CreatedAt); + await _leaveRequestRepository.GetLastLeaveRequestByTypeForUserAsync(rawData.KeycloakUserId, + rawData.Type.Id); //var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty, AccessToken); //var approver = string.Empty; @@ -2889,7 +1866,7 @@ namespace BMA.EHR.Leave.Service.Controllers //approver = list.First().Name; //} - + var leaveSummary = await _leaveRequestRepository.GetSumApproveLeaveByTypeForUserAsync(rawData.KeycloakUserId, rawData.Type.Id, thisYear); //var sumLeave = rawData.LeaveStartDate.DiffDay(rawData.LeaveEndDate); //var sumHoliday = await _holidayRepository.GetHolidayCountAsync(rawData.LeaveStartDate, rawData.LeaveEndDate, category); @@ -2899,50 +1876,17 @@ namespace BMA.EHR.Leave.Service.Controllers var orgName = ""; - if (rawData.Child4 != null && rawData.Child4 != "") - orgName += $" {rawData.Child4}"; - if (rawData.Child3 != null && rawData.Child3 != "") - orgName += $" {rawData.Child3}"; - if (rawData.Child2 != null && rawData.Child2 != "") - orgName += $" {rawData.Child2}"; if (rawData.Child1 != null && rawData.Child1 != "") orgName += $" {rawData.Child1}"; + if (rawData.Child2 != null && rawData.Child2 != "") + orgName += $" {rawData.Child2}"; + if (rawData.Child3 != null && rawData.Child3 != "") + orgName += $" {rawData.Child3}"; + if (rawData.Child4 != null && rawData.Child4 != "") + orgName += $" {rawData.Child4}"; if (rawData.Root != null && rawData.Root != "") orgName += $" {rawData.Root}"; - var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUser2Async(thisYear, rawData.Type.Id, rawData.KeycloakUserId); - - var currentYear = DateTime.Now.Year; - - var fiscalYear = rawData.LeaveStartDate.Month >= 10 ? rawData.LeaveStartDate.Year + 1 : rawData.LeaveStartDate.Year; - var fiscalStart = new DateTime((fiscalYear - 1), 10, 1); - var fiscalEnd = new DateTime(fiscalYear, 9, 30); - - var startFiscalYear = new DateTime(rawData.LeaveStartDate.Year - 1, 10, 1); - var sendLeaveDate = rawData.DateSendLeave ?? rawData.CreatedAt; - var endFiscalYear2 = new DateTime(rawData.LeaveStartDate.Year, 9, 30); - //var endFiscalYear3 = rawData.DateSendLeave ?? rawData.CreatedAt; - var leaveSummary = await _leaveRequestRepository.GetSumApproveLeaveTotalByTypeAndRangeForUser2(rawData.KeycloakUserId, rawData.Type.Id, fiscalStart, fiscalEnd, sendLeaveDate); - - // วันลาแบบร่างและที่ยื่นลาไปแล้ว - var leaveDraftSummary = await _leaveRequestRepository.GetSumDraftLeaveTotalByTypeAndRangeForUser2(rawData.KeycloakUserId, rawData.Type.Id, fiscalStart, fiscalEnd, fiscalEnd.AddDays(1)); - var leaveWaitingSummary = await _leaveRequestRepository.GetSumNewLeaveTotalByTypeAndRangeForUser2(rawData.KeycloakUserId, rawData.Type.Id, fiscalStart, fiscalEnd, fiscalEnd.AddDays(1)); - - //var leaveSummary = leaveData == null ? 0.0 : leaveData.LeaveDaysUsed; - if (leaveData != null) - leaveSummary += leaveData.BeginningLeaveDays; - - var extendLeave = 0.0; - var leaveLimit = (double)rawData.Type.Limit; - - if (rawData.Type.Code == "LV-005") - { - leaveLimit = leaveData == null ? 0.0 : leaveData.LeaveDays; - extendLeave = leaveLimit <= 0 ? 0 : leaveLimit - 10; - if (thisYear < fiscalYear) - extendLeave = 0; - } - var result = new GetLeaveRequestForAdminByIdDto { Id = rawData.Id, @@ -2950,10 +1894,9 @@ namespace BMA.EHR.Leave.Service.Controllers ReasonOligarch = rawData.LeaveDirectorComment ?? "", ProfileType = rawData.ProfileType, LeaveTypeName = rawData.Type.Name, - LeaveSubTypeName = rawData.LeaveSubTypeName, LeaveTypeId = rawData.Type.Id, FullName = $"{rawData.Prefix}{rawData.FirstName} {rawData.LastName}", - DateSendLeave = rawData.DateSendLeave ?? rawData.CreatedAt, + DateSendLeave = rawData.CreatedAt, Status = rawData.LeaveStatus, LeaveStartDate = rawData.LeaveStartDate, LeaveEndDate = rawData.LeaveEndDate, @@ -2962,7 +1905,6 @@ namespace BMA.EHR.Leave.Service.Controllers LeaveNumber = rawData.LeaveNumber, LeaveDetail = rawData.LeaveDetail, LeaveRange = rawData.LeaveRange ?? "ALL", - LeaveRangeEnd = rawData.LeaveRangeEnd ?? "ALL", LeaveDocument = new(), //LeaveDocument = rawData.LeaveDocument == null ? "" : await _minIOService.ImagesPath(rawData.LeaveDocument.Id), LeaveDraftDocument = rawData.LeaveDraftDocument == null ? "" : await _minIOService.ImagesPath(rawData.LeaveDraftDocument.Id), @@ -2982,12 +1924,8 @@ namespace BMA.EHR.Leave.Service.Controllers WifeDayName = rawData.WifeDayName, WifeDayDateBorn = rawData.WifeDayDateBorn, - RestDayOldTotal = extendLeave, - RestDayCurrentTotal = rawData.Type.Limit, - // #1134 - //RestDayOldTotal = rawData.RestDayOldTotal, - //RestDayCurrentTotal = rawData.RestDayCurrentTotal, - + RestDayOldTotal = rawData.RestDayOldTotal, + RestDayCurrentTotal = rawData.RestDayCurrentTotal, OrdainDayStatus = rawData.OrdainDayStatus, OrdainDayLocationName = rawData.OrdainDayLocationName, OrdainDayLocationAddress = rawData.OrdainDayLocationAddress, @@ -3021,9 +1959,6 @@ namespace BMA.EHR.Leave.Service.Controllers CoupleDayEndDateHistory = rawData.CoupleDayEndDateHistory, CoupleDaySumTotalHistory = rawData.CoupleDaySumTotalHistory, - - KeycloakUserId = rawData.KeycloakUserId, - // Dear = approver, // PositionName = profile.Position == null ? "" : profile.Position.Name, // PositionLevelName = profile.PositionLevel == null ? "" : profile.PositionLevel.Name, @@ -3032,21 +1967,19 @@ namespace BMA.EHR.Leave.Service.Controllers // เปลี่ยนมาอ่านจากฐานข้อมูลแทน read_db Dear = rawData.Dear ?? "", - CommanderPosition = rawData.CommanderPosition ?? "", PositionName = rawData.PositionName ?? "", PositionLevelName = rawData.PositionLevelName ?? "", OrganizationName = orgName, //OrganizationName = rawData.OrganizationName ?? "", // fix SIT ระบบบันทึกการลา>>รายการลา (ข้อมูลผู้สังกัดและเรียนไม่แสดง) #971 + + ApproveStep = rawData.ApproveStep ?? "-", - LeaveLimit = rawData.Type.Limit + extendLeave, + LeaveLimit = rawData.Type.Limit, LeaveSummary = leaveSummary, - LeaveRemain = (rawData.Type.Limit + extendLeave) - leaveSummary, - - LeaveDraftSummary = leaveDraftSummary, - LeaveWaitingSummary = leaveWaitingSummary + LeaveRemain = rawData.Type.Limit - leaveSummary }; if (rawData.LeaveDocument != null && rawData.LeaveDocument.Count > 0) @@ -3062,45 +1995,6 @@ namespace BMA.EHR.Leave.Service.Controllers } } - var commanders = rawData.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER") - .Select(x => new GetLeaveApproverDto - { - Seq = x.Seq, - Prefix = x.Prefix, - FirstName = x.FirstName, - LastName = x.LastName, - PositionName = x.PositionName, - PositionSign = x.PositionSign, - ApproveStatus = x.ApproveStatus, - Comment = x.Comment, - ProfileId = x.ProfileId, - KeycloakId = x.KeycloakId, - isAct = x.IsAct, - keyId = x.KeyId - - }).ToList(); - - var approvers = rawData.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER") - .Select(x => new GetLeaveApproverDto - { - Seq = x.Seq, - Prefix = x.Prefix, - FirstName = x.FirstName, - LastName = x.LastName, - PositionName = x.PositionName, - PositionSign = x.PositionSign, - ApproveStatus = x.ApproveStatus, - Comment = x.Comment, - ProfileId = x.ProfileId, - KeycloakId = x.KeycloakId, - - isAct = x.IsAct, - keyId = x.KeyId - }).ToList(); - - result.Approvers.AddRange(approvers); - result.Commanders.AddRange(commanders); - return Success(result); } @@ -3120,61 +2014,60 @@ namespace BMA.EHR.Leave.Service.Controllers public async Task> GetUserLeaveSummaryAsync() { var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); - var thisYear = DateTime.Now.Year; - var toDay = DateTime.Now.Date; - if (toDay >= new DateTime(toDay.Year, 10, 1) && toDay <= new DateTime(toDay.Year, 12, 31)) - thisYear = thisYear + 1; - - // Execute repository calls sequentially to avoid DbContext threading issues var leaveTypes = await _leaveTypeRepository.GetAllAsync(); + var thisYear = DateTime.Now.Year; + var sendList = await _leaveRequestRepository.GetSumSendLeaveAsync(thisYear); + var approveList = await _leaveRequestRepository.GetSumApproveLeaveAsync(thisYear); var rejectList = await _leaveRequestRepository.GetSumRejectLeaveAsync(thisYear); var deleteList = await _leaveRequestRepository.GetSumDeleteLeaveAsync(thisYear); - // var pf = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); - var pf = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken); - if (pf == null) - { - throw new Exception(GlobalMessages.DataNotFound); - } - - // Create dictionaries for fast lookup instead of FirstOrDefault searches - var sendDict = sendList.Where(x => x.KeycloakUserId == userId) - .ToDictionary(x => x.LeaveTypeId, x => x.SumLeaveDay); - var rejectDict = rejectList.Where(x => x.KeycloakUserId == userId) - .ToDictionary(x => x.LeaveTypeId, x => x.SumLeaveDay); - var deleteDict = deleteList.Where(x => x.KeycloakUserId == userId) - .ToDictionary(x => x.LeaveTypeId, x => x.SumLeaveDay); - - // Pre-load all leave beginning data sequentially to avoid DbContext threading issues - var leaveBeginningDict = new Dictionary(); - foreach (var leaveType in leaveTypes) - { - var leaveData = await _leaveBeginningRepository.GetByYearAndTypeIdForUser(thisYear, leaveType.Id, pf); - leaveBeginningDict[leaveType.Id] = leaveData; - } + var approvePrevYear = await _leaveRequestRepository.GetSumApproveLeaveAsync(thisYear - 1); var result = new List(); - foreach (var leaveType in leaveTypes) { - // Use dictionary lookups for better performance - var send = sendDict.GetValueOrDefault(leaveType.Id, 0); - var reject = rejectDict.GetValueOrDefault(leaveType.Id, 0); - var delete = deleteDict.GetValueOrDefault(leaveType.Id, 0); + var sendData = sendList.FirstOrDefault(x => x.KeycloakUserId == userId && x.LeaveTypeId == leaveType.Id); + var send = sendData == null ? 0 : sendData.SumLeaveDay; - leaveBeginningDict.TryGetValue(leaveType.Id, out var leaveData); - var approve = leaveData?.LeaveDaysUsed ?? 0; - var approveCount = leaveData?.LeaveCount ?? 0; + var approveData = approveList.FirstOrDefault(x => x.KeycloakUserId == userId && x.LeaveTypeId == leaveType.Id); + var approve = approveData == null ? 0 : approveData.SumLeaveDay; + + var rejectData = rejectList.FirstOrDefault(x => x.KeycloakUserId == userId && x.LeaveTypeId == leaveType.Id); + var reject = rejectData == null ? 0 : rejectData.SumLeaveDay; + + var deleteData = deleteList.FirstOrDefault(x => x.KeycloakUserId == userId && x.LeaveTypeId == leaveType.Id); + var delete = deleteData == null ? 0 : deleteData.SumLeaveDay; // fix issue : SIT ระบบบันทึกการลา>> สิทธิ์การลา(โอนสิทธิ์การลา) #974 + var extendLeave = 0.0; - var leaveLimit = (double)leaveType.Limit; + var leaveLimit = leaveType.Limit; if (leaveType.Code == "LV-005") { - leaveLimit = leaveData?.LeaveDays ?? 0.0; - extendLeave = leaveLimit <= 0 ? 0 : leaveLimit - 10; + var apprvPrevData = approvePrevYear.FirstOrDefault(x => x.KeycloakUserId == userId && x.LeaveTypeId == leaveType.Id); + var apprvPrev = apprvPrevData == null ? 0 : approveData.SumLeaveDay; + + var profile = await _userProfileRepository.GetProfileByKeycloakIdAsync(userId, AccessToken); + var govAge = (profile?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date); + + if (govAge >= 180) + { + if (govAge >= 3650) + { + // ถ้าอายุราชการเกิน 10 ปี ได้บวกเพิ่มอีก 10 วัน + extendLeave = 30 - apprvPrev; // หายอดวันลาที่เหลือของปีก่อน + if (extendLeave >= 20) extendLeave = 20; + } + else + { + extendLeave = 20 - apprvPrev; // หายอดวันลาที่เหลือของปีก่อน + if (extendLeave >= 10) extendLeave = 10; + } + } + else + leaveLimit = 0; } var data = new @@ -3188,7 +2081,6 @@ namespace BMA.EHR.Leave.Service.Controllers LeaveCountApprove = approve, LeaveCountReject = reject, LeaveCountDelete = delete, - LeaveCountApproveCount = approveCount, }; result.Add(data); } diff --git a/BMA.EHR.Leave/DTOs/AdditionalCheck/ApproveRequestDto.cs b/BMA.EHR.Leave/DTOs/AdditionalCheck/ApproveRequestDto.cs index f40ad39a..7b50313b 100644 --- a/BMA.EHR.Leave/DTOs/AdditionalCheck/ApproveRequestDto.cs +++ b/BMA.EHR.Leave/DTOs/AdditionalCheck/ApproveRequestDto.cs @@ -12,21 +12,4 @@ public string Reason { get; set; } } - - public class ApproveRequestListItemDto - { - /// - /// id ของ record รายการคำขอลงเวลาพิเศษนั้นๆ - /// - public Guid RecId { get; set; } - public string CheckInTime { get; set; } - - public string CheckOutTime { get; set; } - - public string CheckInStatus { get; set; } - - public string CheckOutStatus { get; set; } - - public string Reason { get; set; } - } } diff --git a/BMA.EHR.Leave/DTOs/AdditionalCheck/CreateAdditionalCheckRequestDto.cs b/BMA.EHR.Leave/DTOs/AdditionalCheck/CreateAdditionalCheckRequestDto.cs index 7b2a2084..a242cf81 100644 --- a/BMA.EHR.Leave/DTOs/AdditionalCheck/CreateAdditionalCheckRequestDto.cs +++ b/BMA.EHR.Leave/DTOs/AdditionalCheck/CreateAdditionalCheckRequestDto.cs @@ -9,11 +9,5 @@ public bool CheckOutEdit { get; set;} public string Description { get; set; } - - public string? POI { get; set; } = string.Empty; - - public double? Latitude { get; set; } = 0.0; - - public double? Longitude { get; set; } = 0.0; } } diff --git a/BMA.EHR.Leave/DTOs/AdditionalCheck/GetAdditionalCheckRequestDto.cs b/BMA.EHR.Leave/DTOs/AdditionalCheck/GetAdditionalCheckRequestDto.cs index b315b1b5..75cd6cb7 100644 --- a/BMA.EHR.Leave/DTOs/AdditionalCheck/GetAdditionalCheckRequestDto.cs +++ b/BMA.EHR.Leave/DTOs/AdditionalCheck/GetAdditionalCheckRequestDto.cs @@ -5,9 +5,6 @@ public Guid Id { get; set; } public string FullName { get; set; } - public string? Prefix { get; set; } = string.Empty; - public string? FirstName { get; set; } = string.Empty; - public string? LastName { get; set; } = string.Empty; public DateTime CreatedAt { get; set; } @@ -40,11 +37,5 @@ public string Description { get; set; } public int StatusSort { get; set; } = 0; - - public string? POI { get; set; } = string.Empty; - - public double? Latitude { get; set; } = 0.0; - - public double? Longitude { get; set; } = 0.0; } } diff --git a/BMA.EHR.Leave/DTOs/ChangeRound/CreateChangeRoundDto.cs b/BMA.EHR.Leave/DTOs/ChangeRound/CreateChangeRoundDto.cs index 5379abda..6ad96fcd 100644 --- a/BMA.EHR.Leave/DTOs/ChangeRound/CreateChangeRoundDto.cs +++ b/BMA.EHR.Leave/DTOs/ChangeRound/CreateChangeRoundDto.cs @@ -12,25 +12,4 @@ namespace BMA.EHR.Leave.Service.DTOs.ChangeRound public string Remark { get; set; } } - - public class CreateChangeRoundMultipleDto - { - public Guid ProfileId { get; set; } - - public Guid RoundId { get; set; } - - public DateTime EffectiveDate { get; set; } - - public string Remark { get; set; } - - public Guid? RootDnaId { get; set; } - public Guid? Child1DnaId { get; set; } - public Guid? Child2DnaId { get; set; } - public Guid? Child3DnaId { get; set; } - public Guid? Child4DnaId { get; set; } - - public string? Prefix { get; set; } - public string? FirstName { get; set; } - public string? LastName { get; set; } - } } diff --git a/BMA.EHR.Leave/DTOs/ChangeRound/SearchProfileDto.cs b/BMA.EHR.Leave/DTOs/ChangeRound/SearchProfileDto.cs index 69f5cbba..52bb769c 100644 --- a/BMA.EHR.Leave/DTOs/ChangeRound/SearchProfileDto.cs +++ b/BMA.EHR.Leave/DTOs/ChangeRound/SearchProfileDto.cs @@ -13,13 +13,5 @@ public int PageSize { get; set; } = 10; public string? Keyword { get; set; } - - public string? sortBy { get; set; } - - public bool? descending { get; set; } - - public Guid? SelectedNodeId { get; set; } - - public int? SelectedNode { get; set; } } } diff --git a/BMA.EHR.Leave/DTOs/ChangeRound/SearchProfileResultDto.cs b/BMA.EHR.Leave/DTOs/ChangeRound/SearchProfileResultDto.cs index 00df91a9..6c5bf334 100644 --- a/BMA.EHR.Leave/DTOs/ChangeRound/SearchProfileResultDto.cs +++ b/BMA.EHR.Leave/DTOs/ChangeRound/SearchProfileResultDto.cs @@ -6,22 +6,12 @@ public string CitizenId { get; set; } - public string FullName { get; set; } - - public string? Prefix { get; set; } - public string? FirstName { get; set; } - public string? LastName { get; set; } + public string FullName { get; set; } public string StartTimeMorning { get; set; } public string LeaveTimeAfterNoon { get;set; } public DateTime? EffectiveDate { get; set; } - - public string? RootDnaId { get; set; } - public string? Child1DnaId { get; set; } - public string? Child2DnaId { get; set; } - public string? Child3DnaId { get; set; } - public string? Child4DnaId { get; set; } } } diff --git a/BMA.EHR.Leave/DTOs/CheckIn/CheckInHistoryForAdminDto.cs b/BMA.EHR.Leave/DTOs/CheckIn/CheckInHistoryForAdminDto.cs index c6e13b54..ac4e0e9b 100644 --- a/BMA.EHR.Leave/DTOs/CheckIn/CheckInHistoryForAdminDto.cs +++ b/BMA.EHR.Leave/DTOs/CheckIn/CheckInHistoryForAdminDto.cs @@ -5,9 +5,6 @@ public Guid Id { get; set; } = Guid.Empty; public string FullName { get; set; } = string.Empty; - public string? Prefix { get; set; } = string.Empty; - public string? FirstName { get; set; } = string.Empty; - public string? LastName { get; set; } = string.Empty; public DateTime? CheckInDate { get; set; } = DateTime.MinValue; diff --git a/BMA.EHR.Leave/DTOs/CheckIn/CheckInProcessHistoryForAdminDto.cs b/BMA.EHR.Leave/DTOs/CheckIn/CheckInProcessHistoryForAdminDto.cs index 9ec96c35..be150bdc 100644 --- a/BMA.EHR.Leave/DTOs/CheckIn/CheckInProcessHistoryForAdminDto.cs +++ b/BMA.EHR.Leave/DTOs/CheckIn/CheckInProcessHistoryForAdminDto.cs @@ -5,9 +5,6 @@ public Guid Id { get; set; } = Guid.Empty; public string FullName { get; set; } = string.Empty; - public string? Prefix { get; set; } = string.Empty; - public string? FirstName { get; set; } = string.Empty; - public string? LastName { get; set; } = string.Empty; public DateTime? CheckInDate { get; set; } = DateTime.MinValue; diff --git a/BMA.EHR.Leave/DTOs/CheckIn/CheckTimeDto.cs b/BMA.EHR.Leave/DTOs/CheckIn/CheckTimeDto.cs index 0d49c24f..3a738170 100644 --- a/BMA.EHR.Leave/DTOs/CheckIn/CheckTimeDto.cs +++ b/BMA.EHR.Leave/DTOs/CheckIn/CheckTimeDto.cs @@ -54,7 +54,6 @@ namespace BMA.EHR.Leave.Service.DTOs.CheckIn public Guid? CheckInId { get; set; } - public Guid? TaskId { get; set; } public double Lat { get; set; } = 0; diff --git a/BMA.EHR.Leave/DTOs/LeaveBeginnings/CreateLeaveBeginningDto.cs b/BMA.EHR.Leave/DTOs/LeaveBeginnings/CreateLeaveBeginningDto.cs deleted file mode 100644 index 423385ed..00000000 --- a/BMA.EHR.Leave/DTOs/LeaveBeginnings/CreateLeaveBeginningDto.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; - -namespace BMA.EHR.Leave.Service.DTOs.LeaveBeginnings -{ - public class CreateLeaveBeginningDto - { - [Required] - public Guid ProfileId { get; set; } = Guid.Empty; - - [Required] - public Guid LeaveTypeId { get; set; } = Guid.Empty; - - [Required, Comment("ปีงบประมาณ")] - public int LeaveYear { get; set; } = 0; - - [Required, Comment("จำนวนวันลาที่ได้รับ")] - public double LeaveDays { get; set; } = 0.0; - - [Required, Comment("จำนวนวันลาที่ใช้ไป")] - public double LeaveDaysUsed { get; set; } = 0.0; - - [Required, Comment("จำนวนครั้งที่ลาสะสม")] - public int LeaveCount { get; set; } = 0; - - [Required, Comment("จำนวนวันลายกมา")] - public double BeginningLeaveDays { get; set; } = 0.0; - - [Comment("จำนวนครั้งที่ลายกมา")] - public int BeginningLeaveCount { get; set; } = 0; - } -} diff --git a/BMA.EHR.Leave/DTOs/LeaveBeginnings/EditLeaveBeginningDto.cs b/BMA.EHR.Leave/DTOs/LeaveBeginnings/EditLeaveBeginningDto.cs deleted file mode 100644 index a41aa9f2..00000000 --- a/BMA.EHR.Leave/DTOs/LeaveBeginnings/EditLeaveBeginningDto.cs +++ /dev/null @@ -1,63 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.ComponentModel.DataAnnotations; - -namespace BMA.EHR.Leave.Service.DTOs.LeaveBeginnings -{ - public class EditLeaveBeginningDto - { - [Required] - public Guid ProfileId { get; set; } = Guid.Empty; - - [Required] - public Guid LeaveTypeId { get; set; } = Guid.Empty; - - [Required, Comment("ปีงบประมาณ")] - public int LeaveYear { get; set; } = 0; - - [Required, Comment("จำนวนวันลายกมา")] - public double LeaveDays { get; set; } = 0.0; - - [Comment("จำนวนวันลาที่ใช้ไป")] - public double? LeaveDaysUsed { get; set; } - - [Comment("จำนวนครั้งที่ลาสะสม")] - public int? LeaveCount { get; set; } - - [Required, Comment("จำนวนวันลายกมาก่อนใช้ระบบ")] - public double BeginningLeaveDays { get; set; } = 0.0; - - [Comment("จำนวนครั้งที่ลายกมาก่อนใช้ระบบ")] - public int BeginningLeaveCount { get; set; } = 0; - } - - - public class ScheduleEditLeaveBeginningDto - { - [Required] - public Guid ProfileId { get; set; } = Guid.Empty; - - [Required] - public Guid LeaveTypeId { get; set; } = Guid.Empty; - - [Required, Comment("ปีงบประมาณ")] - public int LeaveYear { get; set; } = 0; - - [Required, Comment("จำนวนวันลายกมา")] - public double LeaveDays { get; set; } = 0.0; - } - - public class ScheduleUpdateDnaDto - { - [Required] - public Guid ProfileId { get; set; } = Guid.Empty; - - // [Required, Comment("ปีงบประมาณ")] - // public int LeaveYear { get; set; } = 0; - - public Guid? RootDnaId { get; set; } - public Guid? Child1DnaId { get; set; } - public Guid? Child2DnaId { get; set; } - public Guid? Child3DnaId { get; set; } - public Guid? Child4DnaId { get; set; } - } -} diff --git a/BMA.EHR.Leave/DTOs/LeaveBeginnings/GetLeaveBeginningDto.cs b/BMA.EHR.Leave/DTOs/LeaveBeginnings/GetLeaveBeginningDto.cs deleted file mode 100644 index 587b99b3..00000000 --- a/BMA.EHR.Leave/DTOs/LeaveBeginnings/GetLeaveBeginningDto.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace BMA.EHR.Leave.Service.DTOs.LeaveBeginnings -{ - public class GetLeaveBeginningDto - { - [Required] - public int Year { get; set; } = 0; - - public Guid Type { get; set; } = Guid.Empty; - - [Required] - public int Page { get; set; } = 1; - - [Required] - public int PageSize { get; set; } = 10; - - public string Keyword { get; set; } = string.Empty; - - public string? sortBy { get; set; } - - public bool? descending { get; set; } - } -} diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/CreateLeaveProcessJobDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/CreateLeaveProcessJobDto.cs deleted file mode 100644 index ae4aacc4..00000000 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/CreateLeaveProcessJobDto.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest -{ - /// - /// ข้อมูลสำหรับสร้าง Job ประมวลผลวันลา โดยมีช่วงวันที่เริ่มต้นและสิ้นสุดของการประมวลผลวันลา - /// - public class CreateLeaveProcessJobDto - { - /// - /// วันที่เริ่มต้นของการประมวลผลวันลา - /// - public DateTime StartDate { get; set; } - - /// - /// วันที่สิ้นสุดของการประมวลผลวันลา - /// - public DateTime EndDate { get; set; } - } -} \ No newline at end of file diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/CreateLeaveRequestDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/CreateLeaveRequestDto.cs index a79f2fc4..aa7d390c 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/CreateLeaveRequestDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/CreateLeaveRequestDto.cs @@ -1,6 +1,4 @@ -using BMA.EHR.Domain.Models.Base; -using Newtonsoft.Json; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest { @@ -9,8 +7,6 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest [Required] public Guid Type { get; set; } = Guid.Empty; - public string? LeaveSubTypeName { get; set; } = string.Empty; - [Required] public DateTime LeaveStartDate { get; set; } = DateTime.Now; @@ -21,8 +17,6 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest public string? LeaveRange { get; set; } = "ALL"; - public string? LeaveRangeEnd { get; set; } = "ALL"; - public double LeaveTotal { get; set; } = 0.0; public string? LeaveAddress { get; set; } @@ -103,10 +97,5 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest public string? CoupleDaySumTotalHistory { get; set; } - public string? Dear { get; set; } - - public string? CommanderPosition { get; set; } } - - } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetCancelLeaveRequestByIdDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetCancelLeaveRequestByIdDto.cs index a9aec603..2859ba6f 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetCancelLeaveRequestByIdDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetCancelLeaveRequestByIdDto.cs @@ -6,8 +6,6 @@ public string LeaveTypeName { get; set; } = string.Empty; - public string? LeaveSubTypeName { get; set; } = string.Empty; - public string FullName { get; set; } = string.Empty; public string Status { get; set; } = string.Empty; @@ -29,11 +27,5 @@ public DateTime LeaveStartDate { get; set; } = DateTime.MinValue; public DateTime LeaveEndDate { get; set;} = DateTime.MinValue; - - public string? LeaveRange { get;set; } = string.Empty; - - public string? LeaveRangeEnd { get; set; } = string.Empty; - - public string? LeaveDirectorComment { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveCancelRequestResultDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveCancelRequestResultDto.cs index 8bede60f..a8023f5e 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveCancelRequestResultDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveCancelRequestResultDto.cs @@ -6,9 +6,7 @@ public string LeaveTypeName { get; set; } - public string? LeaveSubTypeName { get; set; } = string.Empty; - - public Guid LeaveTypeId { get; set; } + public Guid LeaveTypeId { get; set; } public string FullName { get; set; } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveCheckDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveCheckDto.cs index 4e977669..e7a29847 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveCheckDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveCheckDto.cs @@ -12,11 +12,5 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest [Required] public DateTime EndLeaveDate { get; set;} = DateTime.MinValue; - - [Required] - public string LeaveRange { get; set; } = "ALL"; - - [Required] - public string LeaveRangeEnd { get; set; } = "ALL"; } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestByIdDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestByIdDto.cs index 449cecc3..b97474a2 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestByIdDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestByIdDto.cs @@ -9,8 +9,6 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest public string LeaveTypeName { get; set; } = string.Empty; - public string? LeaveSubTypeName { get; set; } = string.Empty; - public Guid LeaveTypeId { get; set; } = Guid.Empty; public string FullName { get; set; } = string.Empty; @@ -27,8 +25,6 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest public string? LeaveRange { get; set; } = string.Empty; - public string? LeaveRangeEnd { get; set; } = string.Empty; - public string LeaveAddress { get; set; } = string.Empty; public string LeaveNumber { get; set; } = string.Empty; @@ -130,7 +126,5 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest public string? OrganizationName { get; set; } = string.Empty; public DateTime? LeaveLast { get; set; } - - public string? CommanderPosition { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestCalendarResultDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestCalendarResultDto.cs index be03ec4c..ef895786 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestCalendarResultDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestCalendarResultDto.cs @@ -19,7 +19,5 @@ public DateTime LeaveEndDate { get; set; } public Guid KeycloakId { get; set; } - - public double LeaveTotal { get; set; } } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminByIdDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminByIdDto.cs index 8afa5ca1..22759a03 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminByIdDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminByIdDto.cs @@ -18,8 +18,6 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest public string LeaveTypeName { get; set; } = string.Empty; - public string? LeaveSubTypeName { get; set; } = string.Empty; - public Guid LeaveTypeId { get; set; } = Guid.Empty; public string FullName { get; set; } = string.Empty; @@ -135,47 +133,6 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest public double LeaveRemain { get; set; } = 0; public string LeaveRange { get; set; } = string.Empty; - - public string LeaveRangeEnd { get; set; } = string.Empty; - public string? ProfileType { get; set; } - - public string? CommanderPosition { get; set; } = string.Empty; - - public List Commanders { get; set; } = new(); - - public List Approvers { get; set; } = new(); - - public Guid? KeycloakUserId { get; set; } = Guid.Empty; - - - public double LeaveDraftSummary { get; set; } = 0; - public double LeaveWaitingSummary { get; set; } = 0; - } - - public class GetLeaveApproverDto - { - public int Seq { get; set; } = 0; - - public string Prefix { get; set; } = string.Empty; - - public string FirstName { get; set; } = string.Empty; - - public string LastName { get; set; } = string.Empty; - - public string PositionName { get; set; } = string.Empty; - - public string PositionSign { get; set; } = string.Empty; - - public Guid ProfileId { get; set; } = Guid.Empty; - - public Guid KeycloakId { get; set; } = Guid.Empty; - - public string ApproveStatus { get; set; } = string.Empty; - - public string Comment { get; set; } = string.Empty; - - public bool isAct { get; set; } = false; - public string keyId { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminDto.cs index d867df77..2a8e4acf 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminDto.cs @@ -28,11 +28,5 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest public string ProfileType { get; set; } = string.Empty; - public string? NodeId { get; set; } = string.Empty; - - public int? Node { get; set; } - - public string? RevisionId { get; set; } = string.Empty; - } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminResultDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminResultDto.cs index d723bd66..b5873f22 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminResultDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestForAdminResultDto.cs @@ -6,8 +6,6 @@ public string LeaveTypeName { get; set; } = string.Empty; - public string? LeaveSubTypeName { get; set; } = string.Empty; - public Guid LeaveTypeId { get; set; } = Guid.Empty; public string FullName { get; set; } = string.Empty; @@ -32,12 +30,8 @@ public string LeaveRange { get; set; } = string.Empty; - public string LeaveRangeEnd { get; set; } = string.Empty; - public bool? HajjDayStatus { get; set; } public string? ProfileType { get; set; } - - public double LeaveTotal { get; set; } } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestTableDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestTableDto.cs index 37d44ec3..43089d16 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestTableDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestTableDto.cs @@ -20,9 +20,5 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest public int PageSize = 10; public string? Keyword { get; set; } = string.Empty; - - public string? SortBy { get; set; } = string.Empty; - - public bool? Descending { get; set; } = false; } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestTableResultDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestTableResultDto.cs index 56eb8300..9ba93ec2 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestTableResultDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetLeaveRequestTableResultDto.cs @@ -6,8 +6,6 @@ public string LeaveTypeName { get; set; } - public string? LeaveSubTypeName { get; set; } = string.Empty; - public Guid LeaveTypeId { get; set; } public string FullName { get; set; } @@ -22,9 +20,5 @@ public DateTime LeaveStartDate { get; set; } = DateTime.Now; public DateTime LeaveEndDate { get; set; } = DateTime.Now; - - public string? LeaveRange { get; set; } = "ALL"; - - public string? LeaveRangeEnd { get; set; } = "ALL"; } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/GetUserLeaveProfileResultDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/GetUserLeaveProfileResultDto.cs index a59eab85..ea512127 100644 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/GetUserLeaveProfileResultDto.cs +++ b/BMA.EHR.Leave/DTOs/LeaveRequest/GetUserLeaveProfileResultDto.cs @@ -8,10 +8,6 @@ public string Dear { get; set; } - public string? LeaveSubTypeName { get; set; } = string.Empty; - - public string? CommanderPosition { get; set; } = string.Empty; - public string FullName { get; set; } public string PositionName { get; set; } @@ -28,8 +24,6 @@ public double RestDayTotalOld { get; set; } - public double RestDayTotalCurrent { get; set; } - public DateTime BirthDate { get; set; } public DateTime? DateAppoint { get; set; } @@ -51,10 +45,5 @@ public string? CurrentProvince { get; set; } public string? CurrentZipCode { get; set; } - - public int GovAge { get; set; } = 0; - - public double LeaveDraftSummary { get; set; } = 0; - public double LeaveWaitingSummary { get; set; } = 0; } } diff --git a/BMA.EHR.Leave/DTOs/LeaveRequest/LeaveRequestApproverDto.cs b/BMA.EHR.Leave/DTOs/LeaveRequest/LeaveRequestApproverDto.cs deleted file mode 100644 index a542d393..00000000 --- a/BMA.EHR.Leave/DTOs/LeaveRequest/LeaveRequestApproverDto.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Newtonsoft.Json; - -namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest -{ - public class LeaveRequestApproverDto - { - [JsonProperty("seq")] - public int Seq { get; set; } = 0; - - [JsonProperty("prefix")] - public string Prefix { get; set; } = string.Empty; - - [JsonProperty("firstName")] - public string FirstName { get; set; } = string.Empty; - - [JsonProperty("lastName")] - public string LastName { get; set; } = string.Empty; - - [JsonProperty("positionName")] - public string PositionName { get; set; } = string.Empty; - - [JsonProperty("positionSign")] - public string? PositionSign { get; set; } = string.Empty; - - [JsonProperty("profileId")] - public Guid ProfileId { get; set; } = Guid.Empty; - - [JsonProperty("keycloakId")] - public Guid KeycloakId { get; set; } = Guid.Empty; - - [JsonProperty("positionLeaveName")] - public string PositionLeaveName { get; set; } = string.Empty; - - [JsonProperty("posExecutiveName")] - public string PosExecutiveName { get; set; } = string.Empty; - - [JsonProperty("organizationName")] - public string OrganizationName { get; set; } = string.Empty; - - [JsonProperty("isAct")] - public bool isAct { get; set; } = false; - - [JsonProperty("keyId")] - public string keyId { get; set; } = string.Empty; - - } -} diff --git a/BMA.EHR.Leave/Dockerfile b/BMA.EHR.Leave/Dockerfile index 5457bcbe..2e851b2c 100644 --- a/BMA.EHR.Leave/Dockerfile +++ b/BMA.EHR.Leave/Dockerfile @@ -1,43 +1,8 @@ -##See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. -# -#FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base -# -## ตั้งค่า TimeZone ใน Container -#ENV TZ=Asia/Bangkok -#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -# -#WORKDIR /app -#EXPOSE 80 -#EXPOSE 443 -# -#FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build -#WORKDIR /src -# -#COPY ["BMA.EHR.Domain/BMA.EHR.Domain.csproj", "BMA.EHR.Domain/"] -#COPY ["BMA.EHR.Application/BMA.EHR.Application.csproj", "BMA.EHR.Application/"] -#COPY ["BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj", "BMA.EHR.Infrastructure/"] -#COPY ["BMA.EHR.Leave/BMA.EHR.Leave.csproj", "BMA.EHR.Leave/"] -# -#RUN dotnet restore "BMA.EHR.Leave/BMA.EHR.Leave.csproj" -#COPY . . -#WORKDIR "/src/BMA.EHR.Leave" -#RUN dotnet build "BMA.EHR.Leave.csproj" -c Release -o /app/build -# -#FROM build AS publish -#RUN dotnet publish "BMA.EHR.Leave.csproj" -c Release -o /app/publish /p:UseAppHost=false -# -#FROM base AS final -#WORKDIR /app -#COPY --from=publish /app/publish . -#ENTRYPOINT ["dotnet", "BMA.EHR.Leave.dll"] -# +#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. -# --------------------------- -# Base image สำหรับ runtime -# --------------------------- FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base -# ตั้งค่า TimeZone +# ตั้งค่า TimeZone ใน Container ENV TZ=Asia/Bangkok RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone @@ -45,40 +10,23 @@ WORKDIR /app EXPOSE 80 EXPOSE 443 -# --------------------------- -# Build stage -# --------------------------- FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src -# 1. Copy เฉพาะ .csproj ไฟล์และ restore เพื่อใช้ cache ได้ COPY ["BMA.EHR.Domain/BMA.EHR.Domain.csproj", "BMA.EHR.Domain/"] COPY ["BMA.EHR.Application/BMA.EHR.Application.csproj", "BMA.EHR.Application/"] COPY ["BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj", "BMA.EHR.Infrastructure/"] COPY ["BMA.EHR.Leave/BMA.EHR.Leave.csproj", "BMA.EHR.Leave/"] RUN dotnet restore "BMA.EHR.Leave/BMA.EHR.Leave.csproj" - -# 2. Copy source code ทั้งหมดหลัง restore เพื่อไม่ให้ cache พังง่าย COPY . . - WORKDIR "/src/BMA.EHR.Leave" +RUN dotnet build "BMA.EHR.Leave.csproj" -c Release -o /app/build -# 3. Build แบบ Release -RUN dotnet build "BMA.EHR.Leave.csproj" -c Release -o /app/build - -# --------------------------- -# Publish stage -# --------------------------- FROM build AS publish RUN dotnet publish "BMA.EHR.Leave.csproj" -c Release -o /app/publish /p:UseAppHost=false -# --------------------------- -# Final runtime image -# --------------------------- FROM base AS final WORKDIR /app - COPY --from=publish /app/publish . - ENTRYPOINT ["dotnet", "BMA.EHR.Leave.dll"] diff --git a/BMA.EHR.Leave/Program.cs b/BMA.EHR.Leave/Program.cs index 5a396430..bda6f614 100644 --- a/BMA.EHR.Leave/Program.cs +++ b/BMA.EHR.Leave/Program.cs @@ -18,13 +18,10 @@ using System.Text; using Hangfire; using Hangfire.MySql; using System.Transactions; -using BMA.EHR.Application.Repositories.Leaves.LeaveRequests; using BMA.EHR.Leave.Service.Filters; using Hangfire.Common; using BMA.EHR.Application.Repositories.Leaves.TimeAttendants; using BMA.EHR.Leave.Service.Extensions; -using BMA.EHR.Leave.Service.Services; -using BMA.EHR.Leave.Services; var builder = WebApplication.CreateBuilder(args); // ตั้ง TimeZone เป็น Asia/Bangkok ในโค้ด @@ -96,17 +93,8 @@ builder.Services.AddApplication(); builder.Services.AddLeaveApplication(); builder.Services.AddPersistence(builder.Configuration); builder.Services.AddLeavePersistence(builder.Configuration); -builder.Services.AddTransient(); -builder.Services.AddTransient(); -// Configure HttpClient with increased timeout for long-running operations (e.g., RabbitMQ Management API) builder.Services.AddHttpClient(); -builder.Services.AddTransient(sp => -{ - var httpClient = sp.GetRequiredService().CreateClient(); - httpClient.Timeout = TimeSpan.FromMinutes(10); // Set timeout to 10 minutes - return httpClient; -}); builder.Services.AddControllers(options => { @@ -122,7 +110,7 @@ builder.Services.AddHealthChecks(); builder.Services.AddRabbitMqConnectionPooling(builder.Configuration); // Add Hangfire services. -var hangfireConnection = builder.Configuration.GetConnectionString("defaultConnection"); +var defaultConnection = builder.Configuration.GetConnectionString("DefaultConnection"); builder.Services.AddHangfire(configuration => configuration .SetDataCompatibilityLevel(CompatibilityLevel.Version_170) @@ -130,24 +118,19 @@ builder.Services.AddHangfire(configuration => configuration .UseRecommendedSerializerSettings() .UseStorage( new MySqlStorage( - hangfireConnection, + defaultConnection, new MySqlStorageOptions { + TransactionIsolationLevel = IsolationLevel.ReadCommitted, QueuePollInterval = TimeSpan.FromSeconds(15), JobExpirationCheckInterval = TimeSpan.FromHours(1), CountersAggregateInterval = TimeSpan.FromMinutes(5), PrepareSchemaIfNecessary = true, DashboardJobListLimit = 50000, TransactionTimeout = TimeSpan.FromMinutes(1), - InvisibilityTimeout = TimeSpan.FromHours(3), - TablesPrefix = "Hangfire_Leave" + TablesPrefix = "Hangfire" }))); -builder.Services.AddHangfireServer(options => - { - options.ServerName = "Leave-Server"; // ← ระบุชื่อ server - options.WorkerCount = 5; // ← - options.Queues = new[] { "leave","default" }; // ← worker จะรันเฉพาะ queue "leave" - }); +builder.Services.AddHangfireServer(); var app = builder.Build(); @@ -172,19 +155,14 @@ app.MapHealthChecks("/health"); app.UseHttpsRedirection(); app.UseCors(); - -app.UseMiddleware(); - app.UseAuthentication(); app.UseAuthorization(); - app.UseDefaultFiles(); app.UseStaticFiles(); app.MapControllers(); -// app.UseMiddleware(); -// // Disable ก่อน เพื่อแก้ไขให้เรีบร้อยก่อนการใช้งาน -// app.UseMiddleware(); - +app.UseMiddleware(); +// Disable ก่อน เพื่อแก้ไขให้เรีบร้อยก่อนการใช้งาน +app.UseMiddleware(); app.UseHangfireDashboard("/hangfire", new DashboardOptions() @@ -195,42 +173,7 @@ app.UseHangfireDashboard("/hangfire", new DashboardOptions() var manager = new RecurringJobManager(); if (manager != null) { - manager.AddOrUpdate("ปรับปรุงรอบการลงเวลาทำงาน", Job.FromExpression(x => x.UpdateUserDutyTime()), "0 1 * * *", - new RecurringJobOptions - { - TimeZone = bangkokTimeZone, - QueueName = "leave" - }); - // ทำความสะอาดข้อมูล CheckIn Job Status ที่เก่ากว่า 30 วัน - รันทุกวันเวลา 02:00 น. - manager.AddOrUpdate("ทำความสะอาดข้อมูล CheckIn Job Status", Job.FromExpression(x => x.CleanupOldJobsAsync(30)), "0 2 * * *", - new RecurringJobOptions - { - TimeZone = bangkokTimeZone, - QueueName = "leave" - }); - - manager.AddOrUpdate("Proceess Beginning สำหรับการลาล่วงหน้า", Job.FromExpression(x => x.ProcessEarlyLeaveRequestSchedule()), "0 1 1 10 *", - new RecurringJobOptions - { - TimeZone = bangkokTimeZone, - QueueName = "leave" - }); - - - // ตรวจสอบและ mark งาน CheckIn ที่ค้างเกิน 30 นาทีเป็น FAILED - รันทุก 15 นาที - // manager.AddOrUpdate("ตรวจสอบงาน CheckIn ที่ค้างเกินเวลา", Job.FromExpression(x => x.MarkStaleJobsAsFailedAsync(30)), "*/15 * * * *", - // new RecurringJobOptions - // { - // TimeZone = bangkokTimeZone, - // QueueName = "leave" - // }); - // - // manager.AddOrUpdate("ประมวลผลงานที่ค้างอยู่ในสถานะ Pending หรือ Processing", Job.FromExpression(x => x.ProcessPendingJobsAsync()), "0 3 * * *", - // new RecurringJobOptions - // { - // TimeZone = bangkokTimeZone, - // QueueName = "leave" // ← กำหนด queue - // }); + manager.AddOrUpdate("ปรับปรุงรอบการลงเวลาทำงาน", Job.FromExpression(x => x.UpdateUserDutyTime()), "0 1 * * *", bangkokTimeZone); } // apply migrations diff --git a/BMA.EHR.Leave/Reports/TimeStampRecords.xlsx b/BMA.EHR.Leave/Reports/TimeStampRecords.xlsx deleted file mode 100644 index d5fe12be..00000000 Binary files a/BMA.EHR.Leave/Reports/TimeStampRecords.xlsx and /dev/null differ diff --git a/BMA.EHR.Leave/Request/HolidayCopyRequest.cs b/BMA.EHR.Leave/Request/HolidayCopyRequest.cs deleted file mode 100644 index 21b04204..00000000 --- a/BMA.EHR.Leave/Request/HolidayCopyRequest.cs +++ /dev/null @@ -1,10 +0,0 @@ - -namespace BMA.EHR.Leave.Service.Request -{ - public class HolidayCopyRequest - { - public int FromYear { get; set; } = DateTime.Now.Year; - - public int ToYear { get; set; } = DateTime.Now.Year; - } -} diff --git a/BMA.EHR.Leave/Request/HolidayRequest.cs b/BMA.EHR.Leave/Request/HolidayRequest.cs deleted file mode 100644 index 7ce9f895..00000000 --- a/BMA.EHR.Leave/Request/HolidayRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ - -namespace BMA.EHR.Leave.Service.Request -{ - public class HolidayRequest - { - public DateTime dateStart { get; set; } = DateTime.Now; - - public DateTime dateEnd { get; set; } = DateTime.Now; - - public int Year { get; set; } = DateTime.Now.Year; - - public string Name { get; set; } = string.Empty; - - } -} diff --git a/BMA.EHR.Leave/Request/HolidayUpdateRequest.cs b/BMA.EHR.Leave/Request/HolidayUpdateRequest.cs deleted file mode 100644 index 91251c96..00000000 --- a/BMA.EHR.Leave/Request/HolidayUpdateRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ - -using BMA.EHR.Domain.Models.MetaData; - -namespace BMA.EHR.Leave.Service.Request -{ - public class HolidayUpdateRequest - { - public List history { get; set; } - - public List updated { get; set; } - - } -} diff --git a/BMA.EHR.Leave/Response/SummaryHolidayByMonthResponseItem.cs b/BMA.EHR.Leave/Response/SummaryHolidayByMonthResponseItem.cs deleted file mode 100644 index 925779f2..00000000 --- a/BMA.EHR.Leave/Response/SummaryHolidayByMonthResponseItem.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace BMA.EHR.Leave.Service.Response -{ - public class SummaryHolidayByMonthResponseItem - { - public int? Id { get; set; } - - public int? Count { get; set; } - - public string? Month { get; set; } - - public string? MonthFull { get; set; } - - } -} diff --git a/BMA.EHR.Leave/Services/HolidayService.cs b/BMA.EHR.Leave/Services/HolidayService.cs deleted file mode 100644 index b7fd99ff..00000000 --- a/BMA.EHR.Leave/Services/HolidayService.cs +++ /dev/null @@ -1,678 +0,0 @@ -using System.Security.Claims; -using BMA.EHR.Domain.Models.MetaData; -using BMA.EHR.Domain.Shared; -using BMA.EHR.Infrastructure.Persistence; -using Microsoft.EntityFrameworkCore; -using BMA.EHR.Domain.Extensions; -using BMA.EHR.Leave.Service.Response; - -namespace BMA.EHR.Leave.Service.Services -{ - public class HolidayService - { - #region " Fields " - - private readonly ApplicationDBContext _context; - private readonly IHttpContextAccessor _httpContextAccessor; - - #endregion - - #region " Constructor and Destructor " - - public HolidayService(ApplicationDBContext context, - IHttpContextAccessor httpContextAccessor) - { - _context = context; - _httpContextAccessor = httpContextAccessor; - } - - #endregion - - #region " Properties " - - private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value; - - private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; - - #endregion - - #region " Methods " - - #region " Private " - - private async Task IsHoliday(DateTime date) - { - var holidays = (await GetsAsync(date.Date.Year)) - .Where(d => d.Category.ToUpper() == "NORMAL") - .Select(d => d.HolidayDate.Date).ToList(); - - if (holidays.Any()) - { - return holidays.Contains(date); - } - else - return false; - } - - private async Task IsHoliday6Days(DateTime date) - { - var holidays = (await GetsAsync(date.Date.Year)) - .Where(d => d.Category.ToUpper() != "NORMAL") - .Select(d => d.HolidayDate.Date).ToList(); - - if (holidays.Any()) - { - return holidays.Contains(date); - } - else - return false; - } - - private async Task IsWeekend(DateTime date) - { - var res = date.DayOfWeek == DayOfWeek.Saturday - || date.DayOfWeek == DayOfWeek.Sunday; - - return await Task.FromResult(res); - } - - private async Task IsWeekend6Days(DateTime date) - { - var res = date.DayOfWeek == DayOfWeek.Sunday; - - return await Task.FromResult(res); - } - - private async Task GetNextWorkingDay(DateTime date) - { - while ((await IsHoliday(date)) || (await IsWeekend(date))) - { - date = date.AddDays(1); - } - - return date; - } - - private async Task GetNextWorkingDay6Days(DateTime date) - { - while ((await IsHoliday6Days(date)) || (await IsWeekend6Days(date))) - { - date = date.AddDays(1); - } - - return date; - } - - private async Task CheckWorkingDay(DateTime date) - { - - while ((await IsHoliday(date)) || (await IsWeekend(date))) - { - return true; - } - - return false; - } - - private async Task CheckWorkingDay6Days(DateTime date) - { - - while ((await IsHoliday6Days(date)) || (await IsWeekend6Days(date))) - { - return true; - } - - return false; - } - - #endregion - - - public async Task> GetsAsync(int year, bool showSpecial = true) - { - var holidays = _context.Holidays.AsQueryable() - .Where(x => x.Year == year.ToCeYear()); - - if (!showSpecial) - { - holidays = holidays.Where(x => !x.IsSpecial); - } - - return await holidays.OrderBy(d => d.HolidayDate.Date).ToListAsync(); - } - - public async Task> GetNormalAsync(int year, bool showSpecial = true) - { - var holidays = _context.Holidays.AsQueryable() - .Where(x => x.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()); - - if (!showSpecial) - { - holidays = holidays.Where(x => !x.IsSpecial); - } - - return await holidays.OrderBy(d => d.HolidayDate.Date).ToListAsync(); - } - - public async Task> Get6DayAsync(int year, bool showSpecial = true) - { - var holidays = _context.Holidays.AsQueryable() - .Where(x => x.Category.ToUpper() != "NORMAL") - .Where(x => x.Year == year.ToCeYear()); - - if (!showSpecial) - { - holidays = holidays.Where(x => !x.IsSpecial); - } - - return await holidays.OrderBy(d => d.HolidayDate.Date).ToListAsync(); - } - - public async Task> GetsAsyncByMonth(int year, int month) - { - return await _context.Holidays.AsQueryable() - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == month) - .OrderBy(d => d.HolidayDate.Date) - .ToListAsync(); - } - - public async Task> GetNormalByMonthAsync(int year, int month) - { - return await _context.Holidays.AsQueryable() - .Where(x => x.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == month) - .OrderBy(d => d.HolidayDate.Date) - .ToListAsync(); - } - - public async Task> Get6DayByMonthAsync(int year, int month) - { - return await _context.Holidays.AsQueryable() - .Where(x => x.Category.ToUpper() != "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == month) - .OrderBy(d => d.HolidayDate.Date) - .ToListAsync(); - } - - public async Task GetByIdAsync(Guid id) - { - return await _context.Holidays.FirstOrDefaultAsync(x => x.Id == id); - } - - public async Task DeleteAsync(Guid id) - { - var existData = await _context.Holidays.FirstOrDefaultAsync(x => x.Id == id); - if (existData != null) - { - _context.Holidays.Remove(existData); - await _context.SaveChangesAsync(); - } - } - - public async Task DeleteRangeAsync(List holidays, bool isNormal = true) - { - foreach (var holiday in holidays) - { - if (isNormal) - { - var existData = await _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .FirstOrDefaultAsync(x => DateTime.Compare(x.HolidayDate.Date, holiday.HolidayDate.Date) == 0); - if (existData != null) - { - _context.Holidays.Remove(existData); - await _context.SaveChangesAsync(); - } - } - else - { - var existData = await _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() != "NORMAL") - .FirstOrDefaultAsync(x => DateTime.Compare(x.HolidayDate.Date, holiday.HolidayDate.Date) == 0); - if (existData != null) - { - _context.Holidays.Remove(existData); - await _context.SaveChangesAsync(); - } - } - } - } - - public async Task UpdateAsync(Guid id, Holiday updated) - { - var existData = await _context.Holidays.FirstOrDefaultAsync(x => x.Id == id); - if (existData != null) - { - // if (!existData.Compare(updated)) - if (existData.Name != updated.Name) - { - existData.Name = updated.Name; - // existData.Year = updated.Year.ToCeYear(); - existData.HolidayDate = updated.HolidayDate.Date; - // existData.HolidayDate = await GetNextWorkingDay(updated.HolidayDate.Date); - existData.OriginalDate = updated.OriginalDate; - existData.LastUpdatedAt = DateTime.Now; - existData.LastUpdateUserId = UserId ?? ""; - existData.LastUpdateFullName = FullName ?? ""; - - await _context.SaveChangesAsync(); - } - } - } - - public async Task UpdateRangeAsync(List historys, List holidays, bool isNormal = true) - { - if (isNormal) - { - // foreach (var holiday in holidays) - // { - // var dupData = await _context.Holidays.AsQueryable() - // .Where(h => h.Category.ToUpper() == "NORMAL") - // .FirstOrDefaultAsync(h => h.Year == holiday.Year && h.Name == holiday.Name && DateTime.Compare(h.HolidayDate.Date, holiday.HolidayDate.Date) != 0); - // if (dupData != null) - // throw new Exception(GlobalMessages.NameDupicate); - // } - - foreach (var history in historys) - { - var existData = await _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .FirstOrDefaultAsync(x => DateTime.Compare(x.HolidayDate.Date, history.HolidayDate.Date) == 0); - if (existData != null) - { - _context.Holidays.Remove(existData); - await _context.SaveChangesAsync(); - } - } - - foreach (var holiday in holidays) - { - // if (!(await IsHoliday(holiday.HolidayDate.Date)) && !(await IsWeekend(holiday.HolidayDate.Date))) - // { - await CreateAsync(holiday); - // } - } - // apply to database - await _context.SaveChangesAsync(); - } - else - { - // foreach (var holiday in holidays) - // { - // var dupData = await _context.Holidays.AsQueryable() - // .Where(h => h.Category.ToUpper() != "NORMAL") - // .FirstOrDefaultAsync(h => h.Year == holiday.Year && h.Name == holiday.Name && DateTime.Compare(h.HolidayDate.Date, holiday.HolidayDate.Date) != 0); - // if (dupData != null) - // throw new Exception(GlobalMessages.NameDupicate); - // } - - foreach (var history in historys) - { - var existData = await _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() != "NORMAL") - .FirstOrDefaultAsync(x => DateTime.Compare(x.HolidayDate.Date, history.HolidayDate.Date) == 0); - if (existData != null) - { - _context.Holidays.Remove(existData); - await _context.SaveChangesAsync(); - } - } - - foreach (var holiday in holidays) - { - // if (!(await IsHoliday6Days(holiday.HolidayDate.Date)) && !(await IsWeekend6Days(holiday.HolidayDate.Date))) - // { - await Create6DayAsync(holiday); - // } - } - // apply to database - await _context.SaveChangesAsync(); - } - - } - - public async Task CreateAsync(Holiday inserted) - { - var existData = await _context.Holidays.AsQueryable() - .Where(d => d.Category.ToUpper() == "NORMAL") - .FirstOrDefaultAsync(h => h.Year == inserted.Year && DateTime.Compare(h.HolidayDate.Date, inserted.HolidayDate.Date) == 0); - - if (existData != null) - throw new Exception(GlobalMessages.DataExist5); - - // var dupData = await _context.Holidays.AsQueryable() - // .Where(d => d.Category.ToUpper() == "NORMAL") - // .FirstOrDefaultAsync(h => h.Year == inserted.Year && h.Name == inserted.Name); - - // if (dupData != null) - // throw new Exception(GlobalMessages.NameDupicate); - - inserted.Id = Guid.NewGuid(); - inserted.Year = inserted.Year.ToCeYear(); - inserted.HolidayDate = inserted.HolidayDate.Date; - // inserted.HolidayDate = await GetNextWorkingDay(inserted.HolidayDate.Date); - inserted.OriginalDate = inserted.HolidayDate.Date; - inserted.CreatedUserId = UserId ?? ""; - inserted.CreatedFullName = FullName ?? "System Administrator"; - inserted.CreatedAt = DateTime.Now; - inserted.LastUpdatedAt = DateTime.Now; - inserted.LastUpdateFullName = FullName ?? "System Administrator"; - inserted.LastUpdateUserId = UserId ?? ""; - inserted.Category = "NORMAL"; - - await _context.Holidays.AddAsync(inserted); - - // apply to database - // await _context.SaveChangesAsync(); - } - - public async Task Create6DayAsync(Holiday inserted) - { - var existData = await _context.Holidays.AsQueryable() - .Where(d => d.Category.ToUpper() != "NORMAL") - .FirstOrDefaultAsync(h => h.Year == inserted.Year && DateTime.Compare(h.HolidayDate.Date, inserted.HolidayDate.Date) == 0); - - if (existData != null) - throw new Exception(GlobalMessages.DataExist6); - - // var dupData = await _context.Holidays.AsQueryable() - // .Where(d => d.Category.ToUpper() != "NORMAL") - // .FirstOrDefaultAsync(h => h.Year == inserted.Year && h.Name == inserted.Name); - - // if (dupData != null) - // throw new Exception(GlobalMessages.NameDupicate); - - inserted.Id = Guid.NewGuid(); - inserted.Year = inserted.Year.ToCeYear(); - inserted.HolidayDate = inserted.HolidayDate.Date; - // inserted.HolidayDate = await GetNextWorkingDay6Days(inserted.HolidayDate.Date); - inserted.OriginalDate = inserted.HolidayDate.Date; - inserted.CreatedUserId = UserId ?? ""; - inserted.CreatedFullName = FullName ?? "System Administrator"; - inserted.CreatedAt = DateTime.Now; - inserted.LastUpdatedAt = DateTime.Now; - inserted.LastUpdateFullName = FullName ?? "System Administrator"; - inserted.LastUpdateUserId = UserId ?? ""; - inserted.Category = "6DAYS"; - - await _context.Holidays.AddAsync(inserted); - - // apply to database - // await _context.SaveChangesAsync(); - } - - public async Task CreateRangeAsync(List holidays, string category) - { - foreach (var holiday in holidays) - { - if (category.ToUpper() == "NORMAL" || category.ToUpper() == "ALL") - { - var existData1 = await _context.Holidays.AsQueryable() - .Where(d => d.Category.ToUpper() == "NORMAL") - .FirstOrDefaultAsync(h => h.Year == holiday.Year && DateTime.Compare(h.HolidayDate.Date, holiday.HolidayDate.Date) == 0); - - if (existData1 != null) - throw new Exception(GlobalMessages.DataExist5); - - // var dupData1 = await _context.Holidays.AsQueryable() - // .Where(d => d.Category.ToUpper() != "NORMAL") - // .FirstOrDefaultAsync(h => h.Year == holiday.Year && h.Name == holiday.Name); - - // if (dupData1 != null) - // throw new Exception(GlobalMessages.NameDupicate); - - // create for normal - var inserted = new Holiday - { - Id = Guid.NewGuid(), - Year = holiday.Year.ToCeYear(), - Name = holiday.Name, - HolidayDate = holiday.HolidayDate.Date, - OriginalDate = holiday.HolidayDate.Date, - CreatedUserId = UserId ?? "", - CreatedFullName = FullName ?? "System Administrator", - CreatedAt = DateTime.Now, - LastUpdatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - Category = "NORMAL", - }; - - await _context.Holidays.AddAsync(inserted); - } - - if (category.ToUpper() == "6DAYS" || category.ToUpper() == "ALL") - { - var existData2 = await _context.Holidays.AsQueryable() - .Where(d => d.Category.ToUpper() != "NORMAL") - .FirstOrDefaultAsync(h => h.Year == holiday.Year && DateTime.Compare(h.HolidayDate.Date, holiday.HolidayDate.Date) == 0); - - if (existData2 != null) - throw new Exception(GlobalMessages.DataExist6); - - // var dupData2 = await _context.Holidays.AsQueryable() - // .Where(d => d.Category.ToUpper() != "6DAYS") - // .FirstOrDefaultAsync(h => h.Year == holiday.Year && h.Name == holiday.Name); - - // if (dupData2 != null) - // throw new Exception(GlobalMessages.NameDupicate); - - // create for 6days - var inserted2 = new Holiday - { - Id = Guid.NewGuid(), - Year = holiday.Year.ToCeYear(), - Name = holiday.Name, - HolidayDate = holiday.HolidayDate.Date, - OriginalDate = holiday.HolidayDate.Date, - CreatedUserId = UserId ?? "", - CreatedFullName = FullName ?? "System Administrator", - CreatedAt = DateTime.Now, - LastUpdatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - Category = "6DAYS", - }; - await _context.Holidays.AddAsync(inserted2); - } - } - // apply to database - await _context.SaveChangesAsync(); - } - - public async Task CopyAsync(int fromYear, int toYear) - { - if (toYear <= fromYear) - throw new Exception(GlobalMessages.HolidayOfYearNotCopy); - - var source = await GetsAsync(fromYear.ToCeYear()); - if (source == null) - throw new Exception(GlobalMessages.HolidayOfYearNotFound); - - // JACK EDIT : เพิ่ม Logic การตรวจเช็คว่าปีที่จะ Copy ไปมีในฐานข้อมูลแล้วหรือไม่? - var dest = await GetsAsync(toYear.ToCeYear()); - if (dest.Count() > 0) - throw new Exception(GlobalMessages.DestinationHolidayIsExist); - source = source.Where(x => x.Category == "NORMAL"); - foreach (var holiday in source) - { - // create for normal - var inserted = new Holiday - { - Id = Guid.NewGuid(), - Year = toYear.ToCeYear(), - Name = holiday.Name, - HolidayDate = await GetNextWorkingDay(holiday.OriginalDate.AddYears(toYear - fromYear)), - OriginalDate = holiday.OriginalDate.AddYears(toYear - fromYear), - CreatedUserId = UserId ?? "", - CreatedFullName = FullName ?? "", - CreatedAt = DateTime.Now, - Category = "NORMAL" - }; - - await _context.Holidays.AddAsync(inserted); - - - // create for 6days - var inserted2 = new Holiday - { - Id = Guid.NewGuid(), - Year = toYear.ToCeYear(), - Name = holiday.Name, - HolidayDate = await GetNextWorkingDay6Days(holiday.OriginalDate.AddYears(toYear - fromYear)), - OriginalDate = holiday.OriginalDate.AddYears(toYear - fromYear), - CreatedUserId = UserId ?? "", - CreatedFullName = FullName ?? "", - CreatedAt = DateTime.Now, - Category = "6DAYS" - }; - await _context.Holidays.AddAsync(inserted2); - - // apply to database - await _context.SaveChangesAsync(); - } - } - - public async Task SaveDatabase() - { - // apply to database - await _context.SaveChangesAsync(); - } - - public async Task> GetDataGroupMonthAsync(int year) - { - var res = new List - {new SummaryHolidayByMonthResponseItem - { - Id = 1, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 1) - .OrderBy(d => d.Name).Count(), - Month = "ม.ค.", - MonthFull = "มกราคม", - },new SummaryHolidayByMonthResponseItem - { - Id = 2, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 2) - .OrderBy(d => d.Name).Count(), - Month = "ก.พ.", - MonthFull = "กุมภาพันธ์", - },new SummaryHolidayByMonthResponseItem - { - Id = 3, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 3) - .OrderBy(d => d.Name).Count(), - Month = "มี.ค.", - MonthFull = "มีนาคม", - },new SummaryHolidayByMonthResponseItem - { - Id = 4, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 4) - .OrderBy(d => d.Name).Count(), - Month = "เม.ย.", - MonthFull = "เมษายน", - },new SummaryHolidayByMonthResponseItem - { - Id = 5, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 5) - .OrderBy(d => d.Name).Count(), - Month = "พ.ค.", - MonthFull = "พฤษภาคม", - },new SummaryHolidayByMonthResponseItem - { - Id = 6, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 6) - .OrderBy(d => d.Name).Count(), - Month = "มิ.ย.", - MonthFull = "มิถุนายน", - },new SummaryHolidayByMonthResponseItem - { - Id = 7, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 7) - .OrderBy(d => d.Name).Count(), - Month = "ก.ค.", - MonthFull = "กรกฎาคม", - },new SummaryHolidayByMonthResponseItem - { - Id = 8, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 8) - .OrderBy(d => d.Name).Count(), - Month = "ส.ค.", - MonthFull = "สิงหาคม", - },new SummaryHolidayByMonthResponseItem - { - Id = 9, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 9) - .OrderBy(d => d.Name).Count(), - Month = "ก.ย.", - MonthFull = "กันยายน", - },new SummaryHolidayByMonthResponseItem - { - Id = 10, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 10) - .OrderBy(d => d.Name).Count(), - Month = "ต.ค.", - MonthFull = "ตุลาคม", - },new SummaryHolidayByMonthResponseItem - { - Id = 11, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 11) - .OrderBy(d => d.Name).Count(), - Month = "พ.ย.", - MonthFull = "พฤศจิกายน", - },new SummaryHolidayByMonthResponseItem - { - Id = 12, - Count = _context.Holidays.AsQueryable() - .Where(h => h.Category.ToUpper() == "NORMAL") - .Where(x => x.Year == year.ToCeYear()) - .Where(x => x.HolidayDate.Month == 12) - .OrderBy(d => d.Name).Count(), - Month = "ธ.ค.", - MonthFull = "ธันวาคม", - } - }; - - - return await Task.FromResult(res); - } - - #endregion - } -} diff --git a/BMA.EHR.Leave/Services/NotificationService.cs b/BMA.EHR.Leave/Services/NotificationService.cs deleted file mode 100644 index 3ada008e..00000000 --- a/BMA.EHR.Leave/Services/NotificationService.cs +++ /dev/null @@ -1,58 +0,0 @@ -using Microsoft.Extensions.Logging; -using Newtonsoft.Json; -using System.Net.Http.Headers; -using System.Text; - -namespace BMA.EHR.Leave.Services; - -public class NotificationService -{ - private readonly IHttpClientFactory _httpClientFactory; - private readonly ILogger _logger; - private readonly IConfiguration _configuration; - - private const string NotifyEndpoint = "https://hrmsbkk.case-collection.com/api/v1/org/through-socket/notify-from-token"; - - public NotificationService(IHttpClientFactory httpClientFactory, ILogger logger, IConfiguration configuration) - { - _httpClientFactory = httpClientFactory; - _logger = logger; - _configuration = configuration; - } - - public async Task SendNotificationAsync(string? token, bool error, string message) - { - if (string.IsNullOrEmpty(token)) - { - _logger.LogWarning("Cannot send import notification: token is null or empty."); - return; - } - - try - { - var client = _httpClientFactory.CreateClient("default"); - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - - var payload = new - { - error, - message - }; - - var json = JsonConvert.SerializeObject(payload); - var content = new StringContent(json, Encoding.UTF8, "application/json"); - - var response = await client.PostAsync(NotifyEndpoint, content); - - if (!response.IsSuccessStatusCode) - { - var responseBody = await response.Content.ReadAsStringAsync(); - _logger.LogWarning("Import notification failed with status {StatusCode}: {Body}", response.StatusCode, responseBody); - } - } - catch (Exception ex) - { - _logger.LogError(ex, "Failed to send import notification: {Message}", ex.Message); - } - } -} diff --git a/BMA.EHR.Leave/appsettings.json b/BMA.EHR.Leave/appsettings.json index 84791566..b5ad52fe 100644 --- a/BMA.EHR.Leave/appsettings.json +++ b/BMA.EHR.Leave/appsettings.json @@ -1,85 +1,65 @@ { - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "Microsoft": "Information", - "System": "Warning" - } - } - }, - "ElasticConfiguration": { - "Uri": "http://192.168.1.63:9200", - "IndexFormat": "hrms-log-index", - "SystemName": "leave" - }, - "AllowedHosts": "*", - "ConnectionStrings": { - // "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - // "ExamConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - // "LeaveConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Information", + "System": "Warning" + } + } + }, + "ElasticConfiguration": { + "Uri": "http://192.168.1.40:9200", + "IndexFormat": "bma-ehr-log-index", + "SystemName": "leave" + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", + "ExamConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", + "LeaveConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - "DefaultConnection": "Server=192.168.1.63;User ID=root;Password=12345678;Port=3306;Database=hrms;Allow User Variables=True;Convert Zero Datetime=True;Pooling=True;", - "ExamConnection": "Server=192.168.1.63;User ID=root;Password=12345678;Port=3306;Database=hrms_exam;Allow User Variables=True;Convert Zero Datetime=True;Pooling=True;", - "LeaveConnection": "Server=192.168.1.63;User ID=root;Password=12345678;Port=3306;Database=hrms_leave;Allow User Variables=True;Convert Zero Datetime=True;Pooling=True;" - -// "DefaultConnection": "server=127.0.0.1;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=13306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;Connection Timeout=180;", -// "ExamConnection": "server=127.0.0.1;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=13306;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;Connection Timeout=180;", -// "LeaveConnection": "server=127.0.0.1;user=root;password=ey2qVVyyqGYw8CyA7h8X72559r2Ad84K;port=13306;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;Connection Timeout=180;" - }, - "Jwt": { - "Key": "j7C9RO_p4nRtuwCH4z9Db_A_6We42tkD_p4lZtDrezc", - "Issuer": "https://hrmsbkk-id.case-collection.com/realms/hrms" -// "Key": "xY2VR-EFvvNPsMs39u8ooVBWQL6mPwrNJOh3koJFTgU", -// "Issuer": "https://hrms-id.bangkok.go.th/realms/hrms" - }, - "EPPlus": { - "ExcelPackage": { - "LicenseContext": "NonCommercial" - } - }, - "MinIO": { - "Endpoint": "https://hrmsbkk-s3.case-collection.com/", - "AccessKey": "iwvzjyjgz0BKtLPmMpPu", - "SecretKey": "Yv56vwctYdIspDknRJ46xztcBDzteGF3elZiDcAr", - "BucketName": "hrms-fpt" -// "Endpoint": "https://hrms-s3.bangkok.go.th/", -// "AccessKey": "frappet", -// "SecretKey": "FPTadmin2357", -// "BucketName": "bma-ehr-fpt" - }, - "Protocol": "HTTPS", - "Node": { - "API": "https://bma-ehr.frappet.synology.me/api/v1/probation" - }, - "Rabbit": { - "Host": "192.168.1.63", - "User": "admin", - "Password": "12345678", - "Queue": "hrms-checkin-queue-dev", - "URL": "http://192.168.1.63:9122/api/queues/%2F/" -// "Host": "172.27.17.68", -// "User": "admin", -// "Password": "admin123456", -// "Queue": "hrms-checkin-queue", -// "URL": "http://172.27.17.68:9122/api/queues/%2F/" - }, - "Mail": { - "Server": "mail.bangkok.go.th", - "User": "saraban.csc.rd@bangkok.go.th", - "Password": "Saraban5222", - "MailFrom": "saraban.csc.rd@bangkok.go.th", - "Port": "25" - }, - "Domain": "https://hrmsbkk.case-collection.com", - "APIPROBATION": "https://hrmsbkk.case-collection.com/api/v1/probation", - "API": "https://hrmsbkk.case-collection.com/api/v1", - "APIV2": "https://hrmsbkk.case-collection.com/api/v2", - "VITE_URL_MGT": "https://hrmsbkk-mgt.case-collection.com", -// "Domain": "https://hrms.bangkok.go.th", -// "APIPROBATION": "https://hrms.bangkok.go.th/api/v1/probation", -// "API": "https://hrms.bangkok.go.th/api/v1", -// "APIV2": "https://hrms.bangkok.go.th/api/v2", -// "VITE_URL_MGT": "https://hrms-mgt.bangkok.go.th", - "API_KEY": "fKRL16yyEgbyTEJdsMw2h64tGSCmkW685PRtM3CygzX1JOSdptT9UJtpgWwKM8FybRTJups3GTFwj27ZRvlPdIkv3XgCoVJaD5LmR06ozuEPvCCRSdp2WFthg08V5xHc56fTPfZLpr1VmXrhd6dvYhHIqKkQUJR02Rlkss11cLRWEQOssEFVA4xdu2J5DIRO1EM5m7wRRvEwcDB4mYRXD9HH52SMq6iYqUWEWsMwLdbk7QW9yYESUEuzMW5gWrb6vIeWZxJV5bTz1PcWUyR7eO9Fyw1F5DiQYc9JgzTC1mW7cv31fEtTtrfbJYKIb5EbWilqIEUKC6A0UKBDDek35ML0006cqRVm0pvdOH6jeq7VQyYrhdXe59dBEyhYGUIfozoVBvW7Up4QBuOMjyPjSqJPlMBKwaseptfrblxQV1AOOivSBpf1ZcQyOZ8JktRtKUDSuXsmG0lsXwFlI3JCeSHdpVdgZWFYcJPegqfrB6KotR02t9AVkpLs1ZWrixwz" -} + //"DefaultConnection": "server=172.27.17.68;user=user;password=cDldaqkwESWvuZ37Gr0n;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", + //"ExamConnection": "server=172.27.17.68;user=user;password=cDldaqkwESWvuZ37Gr0n;port=3306;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", + //"LeaveConnection": "server=172.27.17.68;user=user;password=cDldaqkwESWvuZ37Gr0n;port=3306;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + }, + "Jwt": { + "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", + "Issuer": "https://id.frappet.synology.me/realms/hrms", + //"Key": "xY2VR-EFvvNPsMs39u8ooVBWQL6mPwrNJOh3koJFTgU", + //"Issuer": "https://hrms-id.bangkok.go.th/realms/hrms" + }, + "EPPlus": { + "ExcelPackage": { + "LicenseContext": "NonCommercial" + } + }, + "MinIO": { + "Endpoint": "https://edm-s3.frappet.synology.me/", + "AccessKey": "XxtdnJajPjp3hHuKdOMn", + "SecretKey": "rVPzB05giC7bA400cUuIThzT4T9SGCcpcmL3tBBg", + "BucketName": "bma-ehr-fpt" + }, + "Protocol": "HTTPS", + "Node": { + "API": "https://bma-ehr.frappet.synology.me/api/v1/probation" + }, + "Rabbit": { + "Host": "192.168.1.40", + "API": "https://bma-ehr.frappet.synology.me/api/v1", + "User": "admin", + "Password": "Test123456", + "Queue": "bma-checkin-queue", + "URL": "https://edm-mq.frappet.synology.me/api/queues/%2F/" + }, + "Mail": { + "Server": "mail.bangkok.go.th", + "User": "saraban.csc.rd@bangkok.go.th", + "Password": "Saraban5222", + "MailFrom": "saraban.csc.rd@bangkok.go.th", + "Port": "25" + }, + "API": "https://bma-ehr.frappet.synology.me/api/v1", + //"API": "https://bma-hrms.bangkok.go.th/api/v1", + "API_KEY": "fKRL16yyEgbyTEJdsMw2h64tGSCmkW685PRtM3CygzX1JOSdptT9UJtpgWwKM8FybRTJups3GTFwj27ZRvlPdIkv3XgCoVJaD5LmR06ozuEPvCCRSdp2WFthg08V5xHc56fTPfZLpr1VmXrhd6dvYhHIqKkQUJR02Rlkss11cLRWEQOssEFVA4xdu2J5DIRO1EM5m7wRRvEwcDB4mYRXD9HH52SMq6iYqUWEWsMwLdbk7QW9yYESUEuzMW5gWrb6vIeWZxJV5bTz1PcWUyR7eO9Fyw1F5DiQYc9JgzTC1mW7cv31fEtTtrfbJYKIb5EbWilqIEUKC6A0UKBDDek35ML0006cqRVm0pvdOH6jeq7VQyYrhdXe59dBEyhYGUIfozoVBvW7Up4QBuOMjyPjSqJPlMBKwaseptfrblxQV1AOOivSBpf1ZcQyOZ8JktRtKUDSuXsmG0lsXwFlI3JCeSHdpVdgZWFYcJPegqfrB6KotR02t9AVkpLs1ZWrixwz" +} \ No newline at end of file diff --git a/BMA.EHR.Leave/wwwroot/blank.jpeg b/BMA.EHR.Leave/wwwroot/blank.jpeg deleted file mode 100644 index 2b153486..00000000 Binary files a/BMA.EHR.Leave/wwwroot/blank.jpeg and /dev/null differ diff --git a/BMA.EHR.MetaData.Service/BMA.EHR.MetaData.Service.csproj b/BMA.EHR.MetaData.Service/BMA.EHR.MetaData.Service.csproj index 9ef27e1e..87e2fdaf 100644 --- a/BMA.EHR.MetaData.Service/BMA.EHR.MetaData.Service.csproj +++ b/BMA.EHR.MetaData.Service/BMA.EHR.MetaData.Service.csproj @@ -9,13 +9,10 @@ True . BMA.EHR.MetaData.Service - false - $(NoWarn);$(WarningsNotAsErrors) - - + diff --git a/BMA.EHR.MetaData.Service/Program.cs b/BMA.EHR.MetaData.Service/Program.cs index 2ade94f1..6032b868 100644 --- a/BMA.EHR.MetaData.Service/Program.cs +++ b/BMA.EHR.MetaData.Service/Program.cs @@ -131,13 +131,12 @@ var app = builder.Build(); app.UseHttpsRedirection(); app.UseCors(); - app.UseMiddleware(); app.UseAuthentication(); app.UseAuthorization(); app.UseDefaultFiles(); app.UseStaticFiles(); app.MapControllers(); - //app.UseMiddleware(); + app.UseMiddleware(); // apply migrations await using var scope = app.Services.CreateAsyncScope(); diff --git a/BMA.EHR.OrganizationEmployee.Service/BMA.EHR.OrganizationEmployee.Service.csproj b/BMA.EHR.OrganizationEmployee.Service/BMA.EHR.OrganizationEmployee.Service.csproj index ccc0028b..10fafc6a 100644 --- a/BMA.EHR.OrganizationEmployee.Service/BMA.EHR.OrganizationEmployee.Service.csproj +++ b/BMA.EHR.OrganizationEmployee.Service/BMA.EHR.OrganizationEmployee.Service.csproj @@ -1,20 +1,17 @@ - - net7.0 - enable - enable - 3d68209a-41b1-4d00-914e-b895d74467c0 - Linux - True - . - BMA.EHR.OrganizationEmployee.Service - false - $(NoWarn);$(WarningsNotAsErrors) + + net7.0 + enable + enable + 3d68209a-41b1-4d00-914e-b895d74467c0 + Linux + True + . + BMA.EHR.OrganizationEmployee.Service + - - - + @@ -36,10 +33,10 @@ - + - - - + + + diff --git a/BMA.EHR.OrganizationEmployee.Service/Program.cs b/BMA.EHR.OrganizationEmployee.Service/Program.cs index f3fc0712..3a430cb6 100644 --- a/BMA.EHR.OrganizationEmployee.Service/Program.cs +++ b/BMA.EHR.OrganizationEmployee.Service/Program.cs @@ -113,7 +113,7 @@ var app = builder.Build(); app.UseHttpsRedirection(); - app.UseMiddleware(); + app.UseMiddleware(); app.UseCors(); app.UseAuthentication(); app.UseAuthorization(); diff --git a/BMA.EHR.Placement.Service/BMA.EHR.Placement.Service.csproj b/BMA.EHR.Placement.Service/BMA.EHR.Placement.Service.csproj index 25abca11..9338f6b5 100644 --- a/BMA.EHR.Placement.Service/BMA.EHR.Placement.Service.csproj +++ b/BMA.EHR.Placement.Service/BMA.EHR.Placement.Service.csproj @@ -1,20 +1,17 @@ - - net7.0 - enable - enable - 9d934a68-d1dd-449d-bde0-3078a774ad0f - Linux - True - . - BMA.EHR.Placement.Service - false - $(NoWarn);$(WarningsNotAsErrors) + + net7.0 + enable + enable + 9d934a68-d1dd-449d-bde0-3078a774ad0f + Linux + True + . + BMA.EHR.Placement.Service + - - - + @@ -39,10 +36,10 @@ - + - - - + + + diff --git a/BMA.EHR.Placement.Service/Controllers/MessageController.cs b/BMA.EHR.Placement.Service/Controllers/MessageController.cs deleted file mode 100644 index 9c8ffdfd..00000000 --- a/BMA.EHR.Placement.Service/Controllers/MessageController.cs +++ /dev/null @@ -1,215 +0,0 @@ -using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Domain.Common; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Swashbuckle.AspNetCore.Annotations; - -namespace BMA.EHR.Placement.Service.Controllers -{ - [Route("api/v{version:apiVersion}/placement/message")] - [ApiVersion("1.0")] - [ApiController] - [Produces("application/json")] - [Authorize] - [SwaggerTag("API ระบบ Inbox และ Notification")] - public class MessageController : BaseController - { - #region " Fields " - - private readonly InboxRepository _inboxRepository; - private readonly NotificationRepository _notificationRepository; - - #endregion - - #region " Constuctor and Destructor " - - public MessageController(InboxRepository inboxRepository, - NotificationRepository notificationRepository) - { - _inboxRepository = inboxRepository; - _notificationRepository = notificationRepository; - } - - #endregion - - #region " Methods " - - /// - /// แสดงข้อมูล Inbox ของ user ที่ Login - /// - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("my-inboxes")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetMyInboxAsync(int page = 1, int pageSize = 20) - { - try - { - var inboxes = await _inboxRepository.GetMyInboxAsync(page, pageSize); - - return Success(inboxes); - } - catch - { - throw; - } - } - - /// - /// ดูข้อมูล Inbox ของ user ที่ Login - /// - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("my-inboxes/{id:length(36)}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetByIdMyInboxAsync(Guid id) - { - try - { - await _inboxRepository.GetByIdMyInboxAsync(id); - - return Success(); - } - catch - { - throw; - } - } - - /// - /// ลบข้อมูล Inbox ของ user ที่ Login - /// - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("my-inboxes/{id:length(36)}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> DeleteMyInboxAsync(Guid id) - { - try - { - await _inboxRepository.DeleteMyInboxAsync(id); - - return Success(); - } - catch - { - throw; - } - } - - /// - /// แสดงข้อมูล Notification ของ user ที่ Login - /// - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("my-notifications")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetMyNotificationAsync(int page = 1, int pageSize = 20) - { - try - { - var noti = await _notificationRepository.GetMyNotificationAsync(page, pageSize); - - return Success(noti); - } - catch - { - throw; - } - } - - /// - /// แสดงข้อมูล Notification ของ user ที่ Login ที่ยังไม่ได้อ่าน - /// - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("my-notifications/noread")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> GetMyNotificationAsyncNoread() - { - try - { - var noti = await _notificationRepository.GetMyNotificationAsyncNoread(); - - return Success(noti); - } - catch - { - throw; - } - } - - /// - /// ลบข้อมูล Notification ของ user ที่ Login - /// - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("my-notifications/{id:length(36)}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> DeleteMyNotificationAsync(Guid id) - { - try - { - await _notificationRepository.DeleteMyNotificationAsync(id); - - return Success(); - } - catch - { - throw; - } - } - - /// - /// ลบ Notification ทั้งหมดของ user ที่ login (Hard delete) - /// - /// จำนวนรายการที่ถูกลบ - /// เมื่อทำการลบข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("my-notifications")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> PermanentDeleteAllMyNotificationsAsync() - { - try - { - var affectedRows = await _notificationRepository.DeleteAllMyNotificationsAsync(); - - return Success(affectedRows); - } - catch - { - throw; - } - } - - - #endregion - } -} diff --git a/BMA.EHR.Placement.Service/Controllers/NotifyController.cs b/BMA.EHR.Placement.Service/Controllers/NotifyController.cs index 2b5b25f3..8ef642fa 100644 --- a/BMA.EHR.Placement.Service/Controllers/NotifyController.cs +++ b/BMA.EHR.Placement.Service/Controllers/NotifyController.cs @@ -1,6 +1,10 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; using BMA.EHR.Domain.Common; +using BMA.EHR.Domain.Extensions; +using BMA.EHR.Domain.Models.MetaData; +using BMA.EHR.Domain.Models.Notifications; +using BMA.EHR.Domain.Models.Placement; using BMA.EHR.Domain.Models.Probation; using BMA.EHR.Domain.Shared; using BMA.EHR.Infrastructure.Persistence; @@ -14,6 +18,7 @@ using RabbitMQ.Client; using Swashbuckle.AspNetCore.Annotations; using System.Net.Http.Headers; using System.Security.Claims; +using System.Security.Cryptography; using System.Text; namespace BMA.EHR.Placement.Service.Controllers @@ -129,7 +134,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -218,7 +223,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs index fe2b519a..2ff52c69 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs @@ -1,6 +1,5 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Models.Placement; @@ -13,7 +12,6 @@ using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Swashbuckle.AspNetCore.Annotations; -using System.Diagnostics; using System.Net.Http.Headers; using System.Security.Claims; @@ -33,7 +31,6 @@ namespace BMA.EHR.Placement.Service.Controllers private readonly MinIOService _documentService; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; public PlacementAppointmentController(PlacementRepository repository, @@ -42,7 +39,6 @@ namespace BMA.EHR.Placement.Service.Controllers MinIOService documentService, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - UserProfileRepository userProfileRepository, PermissionRepository permiss) { _repository = repository; @@ -51,7 +47,6 @@ namespace BMA.EHR.Placement.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _configuration = configuration; - _userProfileRepository = userProfileRepository; _permission = permiss; } @@ -61,7 +56,6 @@ namespace BMA.EHR.Placement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -76,48 +70,17 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet()] public async Task> GetListByAdmin(string? status = "ALL") { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_PROMOTION_OFFICER"); + var getPermission = await _permission.GetPermissionOrgAPIAsync("LIST", "SYS_PROMOTION_OFFICER", UserId); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; + // string?[] rootId = jsonData?.result?.rootId ?? null; + // string?[] child1Id = jsonData?.result?.child1Id ?? null; + // string?[] child2Id = jsonData?.result?.child2Id ?? null; + // string?[] child3Id = jsonData?.result?.child3Id ?? null; + // string?[] child4Id = jsonData?.result?.child4Id ?? null; var placementAppointments = await _context.PlacementAppointments.AsQueryable() .Where(x => x.type == "OFFICER") // .Where(x => rootId == null ? true : rootId.Contains(x.rootOldId)) @@ -155,8 +118,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.posMasterNo, p.position, p.PositionExecutive, - p.positionExecutiveField, - p.positionArea, p.positionField, p.posTypeId, p.posTypeName, @@ -206,55 +167,12 @@ namespace BMA.EHR.Placement.Service.Controllers p.posmasterId, p.positionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.CreatedAt, p.typeCommand, - p.rootDnaId, - p.child1DnaId, - p.child2DnaId, - p.child3DnaId, - p.child4DnaId, }) .ToListAsync(); if (status != null && status.Trim().ToUpper() != "ALL") placementAppointments = placementAppointments.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - placementAppointments = placementAppointments - .Where(x => node == 4 ? x.child4DnaId == nodeId : (node == 3 ? x.child3DnaId == nodeId : (node == 2 ? x.child2DnaId == nodeId : (node == 1 ? x.child1DnaId == nodeId : (node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - placementAppointments = placementAppointments - .Where(x => node == 4 ? x.child3DnaId == nodeId : (node == 3 ? x.child2DnaId == nodeId : (node == 2 ? x.child1DnaId == nodeId : (node == 1 || node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - placementAppointments = placementAppointments - .Where(x => x.rootDnaId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // placementAppointments = placementAppointments - // .Where(x => x.rootDnaId == nodeId && x.child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - placementAppointments = placementAppointments.Where(x => - node == 0 ? x.rootDnaId == nodeId && x.child1DnaId == null : - node == 1 ? x.child1DnaId == nodeId && x.child2DnaId == null : - node == 2 ? x.child2DnaId == nodeId && x.child3DnaId == null : - node == 3 ? x.child3DnaId == nodeId && x.child4DnaId == null : - node == 4 ? x.child4DnaId == nodeId : - true - ).ToList(); - } return Success(placementAppointments); } @@ -311,8 +229,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.posMasterNo, p.position, p.PositionExecutive, - p.positionExecutiveField, - p.positionArea, p.positionField, p.posTypeId, p.posTypeName, @@ -346,7 +262,7 @@ namespace BMA.EHR.Placement.Service.Controllers p.CreatedAt, p.Reason, - EducationOld = !string.IsNullOrEmpty(p.EducationOld) ? p.EducationOld : "ปริญญาตรี", + p.EducationOld, salary = p.AmountOld, p.PositionTypeOld, p.PositionLevelOld, @@ -357,8 +273,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.OrganizationOld, p.positionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.typeCommand, p.posmasterId, }) @@ -397,8 +311,6 @@ namespace BMA.EHR.Placement.Service.Controllers data.posMasterNo, data.position, data.PositionExecutive, - data.positionExecutiveField, - data.positionArea, data.positionField, data.posTypeId, data.posTypeName, @@ -447,8 +359,6 @@ namespace BMA.EHR.Placement.Service.Controllers organizationOld = data.OrganizationOld == "/" || data.OrganizationOld == null ? null : data.OrganizationOld, data.positionOld, data.PositionExecutiveOld, - data.positionExecutiveFieldOld, - data.positionAreaOld, // Docs = placementAppointmentDocs, data.typeCommand, data.posmasterId, @@ -503,7 +413,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -534,11 +444,6 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.child4Old = org.result.child4; placementAppointment.child4OldId = org.result.child4Id; placementAppointment.child4ShortNameOld = org.result.child4ShortName; - placementAppointment.rootDnaId = org.result.rootDnaId; - placementAppointment.child1DnaId = org.result.child1DnaId; - placementAppointment.child2DnaId = org.result.child2DnaId; - placementAppointment.child3DnaId = org.result.child3DnaId; - placementAppointment.child4DnaId = org.result.child4DnaId; placementAppointment.posMasterNoOld = org.result.posMasterNo; placementAppointment.posTypeOldId = org.result.posTypeId; placementAppointment.posTypeNameOld = org.result.posTypeName; @@ -550,19 +455,15 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.positionOld = org.result.position; placementAppointment.PositionExecutiveOld = org.result.posExecutiveName; - placementAppointment.positionExecutiveFieldOld = org.result.positionExecutiveField; - placementAppointment.positionAreaOld = org.result.positionArea; placementAppointment.PositionLevelOld = org.result.posLevelName; placementAppointment.PositionTypeOld = org.result.posTypeName; - placementAppointment.PositionNumberOld = org.result.posNo; + placementAppointment.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; placementAppointment.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + (org.result.child1 == null ? "" : org.result.child1 + "\n") + (org.result.root == null ? "" : org.result.root); - placementAppointment.OrganizationPositionOld = org.result.position + "\n" + - (placementAppointment.PositionExecutiveOld == null ? "" : (placementAppointment.positionExecutiveField == null ? placementAppointment.PositionExecutiveOld + "\n" : placementAppointment.PositionExecutiveOld + "(" + placementAppointment.positionExecutiveField + ")" + "\n")) - + placementAppointment.OrganizationOld; + placementAppointment.OrganizationPositionOld = org.result.position + "\n" + (placementAppointment.PositionExecutiveOld == null ? "" : placementAppointment.PositionExecutiveOld + "\n") + placementAppointment.OrganizationOld; placementAppointment.AmountOld = org.result.salary; } await _context.PlacementAppointments.AddAsync(placementAppointment); @@ -621,7 +522,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -659,7 +560,7 @@ namespace BMA.EHR.Placement.Service.Controllers // using (var client = new HttpClient()) // { // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + // client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); // var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new // { // posMasterOldId = uppdated.posmasterId, @@ -676,9 +577,6 @@ namespace BMA.EHR.Placement.Service.Controllers uppdated.posMasterNo = req.posMasterNo; uppdated.position = req.positionName; uppdated.PositionExecutive = req.posExecutiveName; - uppdated.posExecutiveId = req.posExecutiveId; - uppdated.positionExecutiveField = req.positionExecutiveField; - uppdated.positionArea = req.positionArea; uppdated.positionField = req.positionField; uppdated.posTypeId = req.posTypeId; uppdated.posTypeName = req.posTypeName; @@ -924,7 +822,7 @@ namespace BMA.EHR.Placement.Service.Controllers OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), LeaveDate = "-", NewOc = (p.position == null ? "" : $"{p.position}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + @@ -933,16 +831,16 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, NewPositionNumber = p.posMasterNo == null ? "-" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -1009,16 +907,10 @@ namespace BMA.EHR.Placement.Service.Controllers positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, positionExecutive = p.PositionExecutive, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, - positionTypeId = p.posTypeId, positionType = p.posTypeName, - positionLevelId = p.posLevelId, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -1041,39 +933,24 @@ namespace BMA.EHR.Placement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.Status = "DONE"); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -1155,7 +1032,7 @@ namespace BMA.EHR.Placement.Service.Controllers OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), LeaveDate = "-", NewOc = (p.position == null ? "" : $"{p.position}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + @@ -1164,16 +1041,16 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, NewPositionNumber = p.posMasterNo == null ? "-" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -1240,16 +1117,10 @@ namespace BMA.EHR.Placement.Service.Controllers positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, positionExecutive = p.PositionExecutive, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, - positionTypeId = p.posTypeId, positionType = p.posTypeName, - positionLevelId = p.posLevelId, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -1272,39 +1143,24 @@ namespace BMA.EHR.Placement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.Status = "DONE"); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -1386,7 +1242,7 @@ namespace BMA.EHR.Placement.Service.Controllers OldPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), NewOc = (p.position == null ? "" : $"{p.position}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + @@ -1394,14 +1250,14 @@ namespace BMA.EHR.Placement.Service.Controllers (p.root == null ? "" : $"{p.root}"), NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName.ToThaiNumber(), NewPositionNumber = p.posMasterNo == null ? "-" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -1487,39 +1343,24 @@ namespace BMA.EHR.Placement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-current"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.Status = "DONE"); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-current"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -1598,30 +1439,30 @@ namespace BMA.EHR.Placement.Service.Controllers FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", OldOc = p.OrganizationPositionOld == null ? "-" : p.OrganizationPositionOld, OldPositionNumber = p.posMasterNoOld == null ? "-" : - p.child4Old != null ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.child3Old != null ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.child2Old != null ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.child1Old != null ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.rootOld != null ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "-", + p.child4Old != null ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.child3Old != null ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.child2Old != null ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.child1Old != null ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.rootOld != null ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-", OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), NewOc = (p.position == null ? "" : $"{p.position}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + (p.child1 == null ? "" : $"{p.child1}\n") + (p.root == null ? "" : $"{p.root}"), NewPositionNumber = p.posMasterNo == null ? "-" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), ReportingDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -1707,39 +1548,24 @@ namespace BMA.EHR.Placement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-current"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.Status = "DONE"); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-current"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -1784,7 +1610,7 @@ namespace BMA.EHR.Placement.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.PlacementStatus.ToUpper() == "REPORT") .ToListAsync(); - placementProfiles.ForEach(profile => profile.Status = "PENDING"); + placementProfiles.ForEach(profile => profile.Status = "PREPARE-CONTAIN"); await _context.SaveChangesAsync(); return Success(); } @@ -1826,15 +1652,15 @@ namespace BMA.EHR.Placement.Service.Controllers OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld, OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld, OldPositionNumber = p.posMasterNoOld == null ? "-" : - p.child4Old != null ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.child3Old != null ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.child2Old != null ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.child1Old != null ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.rootOld != null ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "-", + p.child4Old != null ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.child3Old != null ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.child2Old != null ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.child1Old != null ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.rootOld != null ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-", OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), PositionDate = p.PositionDate == null ? "-" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), NewOc = (p.position == null ? "" : $"{p.position}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + @@ -1843,16 +1669,16 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, NewPositionNumber = p.posMasterNo == null ? "" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -1918,16 +1744,10 @@ namespace BMA.EHR.Placement.Service.Controllers positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, positionExecutive = p.PositionExecutive, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, - positionTypeId = p.posTypeId, positionType = p.posTypeName, - positionLevelId = p.posLevelId, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -1950,39 +1770,24 @@ namespace BMA.EHR.Placement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.Status = "DONE"); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -2030,137 +1835,5 @@ namespace BMA.EHR.Placement.Service.Controllers await _context.SaveChangesAsync(); return Success(); } - - /// - /// ส่งรายชื่อออกคำสั่ง C-PM-47 - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("gazette/report")] - public async Task> PostGazetteReportAppoint([FromBody] ReportPersonRequest req) - { - var placementProfiles = await _context.PlacementAppointments - .Where(x => req.refIds.Contains(x.Id.ToString())) - .ToListAsync(); - placementProfiles.ForEach(profile => - { - profile.Status = req.status.Trim().ToUpper(); - //profile.typeCommand = "APPOINT"; - }); - await _context.SaveChangesAsync(); - return Success(); - } - - /// - /// ลบรายชื่อออกคำสั่ง C-PM-47 - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("gazette/report/delete")] - public async Task> PostGazetteReportDeleteAppoint([FromBody] ReportPersonRequest req) - { - var placementProfiles = await _context.PlacementAppointments - .Where(x => req.refIds.Contains(x.Id.ToString())) - .ToListAsync(); - placementProfiles.ForEach(profile => profile.Status = "PENDING"); - await _context.SaveChangesAsync(); - return Success(); - } - - /// - /// ออกคำสั่ง C-PM-47 โปรดเกล้าฯ แต่งตั้งให้ดำรงตำแหน่ง - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("gazette/report/excecute")] - public async Task> PostGazetteReportExecuteAppoint([FromBody] ReportExecuteRequest req) - { - var data = await _context.PlacementAppointments - .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) - .ToListAsync(); - var resultData = (from p in data - join r in req.refIds - on p.Id.ToString() equals r.refId - select new - { - profileId = p.profileId, - amount = r.amount, - amountSpecial = r.amountSpecial, - positionSalaryAmount = r.positionSalaryAmount, - mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutive, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, - positionType = p.posTypeName, - positionLevel = p.posLevelName, - posmasterId = p.posmasterId, - positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, - commandId = r.commandId, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - commandNo = r.commandNo, - commandYear = r.commandYear, - posNo = p.posMasterNo?.ToString(), - posNoAbb = p.node == 4 ? $"{p.child4ShortName}" : - p.node == 3 ? $"{p.child3ShortName}" : - p.node == 2 ? $"{p.child2ShortName}" : - p.node == 1 ? $"{p.child1ShortName}" : - p.node == 0 ? $"{p.rootShortName}" : "", - commandDateAffect = r.commandDateAffect, - commandDateSign = r.commandDateSign, - positionName = p.position, - commandCode = r.commandCode, - commandName = r.commandName, - remark = r.remark, - }).ToList(); - - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.Status = "DONE"); - // await _context.SaveChangesAsync(); - // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => - { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); - } } } diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs index 12325ecb..ddd7728f 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs @@ -1,6 +1,5 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Models.Placement; using BMA.EHR.Domain.Shared; @@ -31,7 +30,6 @@ namespace BMA.EHR.Placement.Service.Controllers private readonly MinIOService _documentService; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; public PlacementAppointmentEmployeeController(PlacementRepository repository, @@ -40,7 +38,6 @@ namespace BMA.EHR.Placement.Service.Controllers MinIOService documentService, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - UserProfileRepository userProfileRepository, PermissionRepository permission) { _repository = repository; @@ -49,7 +46,6 @@ namespace BMA.EHR.Placement.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _configuration = configuration; - _userProfileRepository = userProfileRepository; _permission = permission; } @@ -59,7 +55,6 @@ namespace BMA.EHR.Placement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -74,48 +69,17 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet()] public async Task> GetListByAdmin(string? status = "ALL") { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_PROMOTION_EMP"); + var getPermission = await _permission.GetPermissionOrgAPIAsync("LIST", "SYS_PROMOTION_EMP", UserId); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; + // string?[] rootId = jsonData?.result?.rootId ?? null; + // string?[] child1Id = jsonData?.result?.child1Id ?? null; + // string?[] child2Id = jsonData?.result?.child2Id ?? null; + // string?[] child3Id = jsonData?.result?.child3Id ?? null; + // string?[] child4Id = jsonData?.result?.child4Id ?? null; var placementAppointments = await _context.PlacementAppointments.AsQueryable() .Where(x => x.type == "EMPLOYEE") // .Where(x => rootId == null ? true : rootId.Contains(x.rootOldId)) @@ -203,51 +167,32 @@ namespace BMA.EHR.Placement.Service.Controllers p.positionOld, p.CreatedAt, p.typeCommand, - p.rootDnaId, - p.child1DnaId, - p.child2DnaId, - p.child3DnaId, - p.child4DnaId, }) .ToListAsync(); + // if (keyword != "") + // { + // var data = placementAppointments.Where(x => + // (x.citizenId != null && x.citizenId.Contains(keyword)) || + // (x.prefix != null && x.prefix.Contains(keyword)) || + // (x.firstName != null && x.firstName.Contains(keyword)) || + // (x.lastName != null && x.lastName.Contains(keyword)) || + // (x.rootShortNameOld != null && x.rootShortNameOld.Contains(keyword)) || + // (x.posMasterNoOld != null && x.posMasterNoOld.ToString().Contains(keyword)) || + // (x.OrganizationOld != null && x.OrganizationOld.Contains(keyword)) || + // (x.posTypeNameOld != null && x.posTypeNameOld.Contains(keyword)) || + // (x.posLevelNameOld != null && x.posLevelNameOld.Contains(keyword)) || + // (x.OrganizationPositionOld != null && x.OrganizationPositionOld.Contains(keyword)) || + // (x.Reason != null && x.Reason.Contains(keyword)) || + // (x.nodeName != null && x.nodeName.Contains(keyword))) + // .OrderByDescending(x => x.CreatedAt) + // .Skip((page - 1) * pageSize) + // .Take(pageSize) + // .ToList(); + + // placementAppointments = data; + // } if (status != null && status.Trim().ToUpper() != "ALL") placementAppointments = placementAppointments.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - placementAppointments = placementAppointments - .Where(x => node == 4 ? x.child4DnaId == nodeId : (node == 3 ? x.child3DnaId == nodeId : (node == 2 ? x.child2DnaId == nodeId : (node == 1 ? x.child1DnaId == nodeId : (node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - placementAppointments = placementAppointments - .Where(x => node == 4 ? x.child3DnaId == nodeId : (node == 3 ? x.child2DnaId == nodeId : (node == 2 ? x.child1DnaId == nodeId : (node == 1 || node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - placementAppointments = placementAppointments - .Where(x => x.rootDnaId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // placementAppointments = placementAppointments - // .Where(x => x.rootDnaId == nodeId && x.child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - placementAppointments = placementAppointments.Where(x => - node == 0 ? x.rootDnaId == nodeId && x.child1DnaId == null : - node == 1 ? x.child1DnaId == nodeId && x.child2DnaId == null : - node == 2 ? x.child2DnaId == nodeId && x.child3DnaId == null : - node == 3 ? x.child3DnaId == nodeId && x.child4DnaId == null : - node == 4 ? x.child4DnaId == nodeId : - true - ).ToList(); - } return Success(placementAppointments); } @@ -493,7 +438,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -530,11 +475,6 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.posLevelOldId = org.result.posLevelId; placementAppointment.posLevelNameOld = org.result.posLevelName; placementAppointment.EducationOld = org.result.education; - placementAppointment.rootDnaId = org.result.rootDnaId; - placementAppointment.child1DnaId = org.result.child1DnaId; - placementAppointment.child2DnaId = org.result.child2DnaId; - placementAppointment.child3DnaId = org.result.child3DnaId; - placementAppointment.child4DnaId = org.result.child4DnaId; // placementAppointment.EducationOld = profile.Educations.Count() == 0 ? null : $"{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Degree}-{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Field}"; // placementAppointment.AmountOld = profile.Salaries.Count() == 0 ? null : profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount; placementAppointment.AmountOld = org.result.salary; @@ -542,7 +482,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.positionOld = org.result.position; placementAppointment.PositionLevelOld = org.result.posLevelName; placementAppointment.PositionTypeOld = org.result.posTypeName; - placementAppointment.PositionNumberOld = org.result.posNo; + placementAppointment.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; placementAppointment.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -606,7 +546,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -645,7 +585,7 @@ namespace BMA.EHR.Placement.Service.Controllers // using (var client = new HttpClient()) // { // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + // client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); // var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new // { // posMasterOldId = uppdated.posmasterId, diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs index af1d954e..eb07ddf3 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs @@ -62,9 +62,9 @@ namespace BMA.EHR.Placement.Service.Controllers #region " Properties " private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value; + private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor.HttpContext.Request.Headers["Authorization"]; - //private bool isSuperAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("SUPER_ADMIN") ?? false; #endregion @@ -86,7 +86,7 @@ namespace BMA.EHR.Placement.Service.Controllers { Id = x.FirstOrDefault().Year, Name = x.FirstOrDefault().Year + 543, - }).OrderByDescending(x => x.Id).ToList(); + }).ToList(); return Success(_data); } @@ -140,7 +140,6 @@ namespace BMA.EHR.Placement.Service.Controllers public async Task> GetExamByPlacement(Guid examId) { var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(examId.ToString(), "SYS_PLACEMENT_PASS"); - var role = string.Empty; if (getWorkflow == false) { var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_PLACEMENT_PASS"); @@ -149,7 +148,6 @@ namespace BMA.EHR.Placement.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - role = jsonData["result"]?.ToString(); } var rootId = ""; @@ -157,31 +155,29 @@ namespace BMA.EHR.Placement.Service.Controllers var child2Id = ""; var child3Id = ""; var child4Id = ""; - var rootDnaId = ""; var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position-act"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); if (_res.IsSuccessStatusCode) { var org = JsonConvert.DeserializeObject(_result); - if (org.result.isOfficer == false && role?.Trim().ToUpper() != "OWNER") + if (org.result.isOfficer == false) { rootId = org.result.rootId == null ? "" : org.result.rootId; // child1Id = org.result.child1Id == null ? "" : org.result.child1Id; // child2Id = org.result.child2Id == null ? "" : org.result.child2Id; // child3Id = org.result.child3Id == null ? "" : org.result.child3Id; // child4Id = org.result.child4Id == null ? "" : org.result.child4Id; - rootDnaId = org.result.rootDnaId == null ? "" : org.result.rootDnaId; var data1 = await _context.PlacementProfiles .Where(x => x.Placement.Id == examId) .Where(x => x.Draft == true) .Where(x => x.PlacementStatus != "UN-CONTAIN") - .Where(x => rootDnaId == "" ? true : (child1Id == "" ? x.rootDnaId == rootDnaId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))) + .Where(x => rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))) .Select(x => new { Id = x.Id, @@ -304,7 +300,7 @@ namespace BMA.EHR.Placement.Service.Controllers } return Success(result1); } - if (org.result.isOfficer == true || role?.Trim().ToUpper() == "OWNER") + if (org.result.isOfficer == true) { var data = await _context.PlacementProfiles.Where(x => x.Placement.Id == examId).Select(x => new { @@ -441,7 +437,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -692,25 +688,17 @@ namespace BMA.EHR.Placement.Service.Controllers public async Task> GetDashboardByPlacement(Guid examId) { - var role = string.Empty; - var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_PLACEMENT_PASS"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() == "200") - { - role = jsonData["result"]?.ToString(); - } var rootId = ""; var child1Id = ""; var child2Id = ""; var child3Id = ""; var child4Id = ""; - var rootDnaId = ""; var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position-act"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -718,31 +706,30 @@ namespace BMA.EHR.Placement.Service.Controllers if (_res.IsSuccessStatusCode) { var org = JsonConvert.DeserializeObject(_result); - if (org.result.isOfficer == false && role?.Trim().ToUpper() != "OWNER") + if (org.result.isOfficer == false) { rootId = org.result.rootId == null ? "" : org.result.rootId; // child1Id = org.result.child1Id == null ? "" : org.result.child1Id; // child2Id = org.result.child2Id == null ? "" : org.result.child2Id; // child3Id = org.result.child3Id == null ? "" : org.result.child3Id; // child4Id = org.result.child4Id == null ? "" : org.result.child4Id; - rootDnaId = org.result.rootDnaId == null ? "" : org.result.rootDnaId; var placement = await _context.Placements .Where(x => x.Id == examId) .Select(x => new { - Total = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootDnaId == "" ? true : (child1Id == "" ? x.rootDnaId == rootDnaId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Count(), - UnContain = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootDnaId == "" ? true : (child1Id == "" ? x.rootDnaId == rootDnaId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Where(p => p.PlacementStatus.Trim().ToUpper() == "UN-CONTAIN").Count(), - PrepareContain = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootDnaId == "" ? true : (child1Id == "" ? x.rootDnaId == rootDnaId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Where(p => p.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN").Count(), - Report = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootDnaId == "" ? true : (child1Id == "" ? x.rootDnaId == rootDnaId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Where(p => p.PlacementStatus.Trim().ToUpper() == "REPORT").Count(), - Done = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootDnaId == "" ? true : (child1Id == "" ? x.rootDnaId == rootDnaId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Where(p => p.PlacementStatus.Trim().ToUpper() == "DONE").Count(), - Disclaim = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootDnaId == "" ? true : (child1Id == "" ? x.rootDnaId == rootDnaId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Where(p => p.PlacementStatus.Trim().ToUpper() == "DISCLAIM").Count(), + Total = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Count(), + UnContain = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Where(p => p.PlacementStatus.Trim().ToUpper() == "UN-CONTAIN").Count(), + PrepareContain = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Where(p => p.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN").Count(), + Report = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Where(p => p.PlacementStatus.Trim().ToUpper() == "REPORT").Count(), + Done = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Where(p => p.PlacementStatus.Trim().ToUpper() == "DONE").Count(), + Disclaim = x.PlacementProfiles.Where(x => x.Draft == true).Where(x => rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))).Where(p => p.PlacementStatus.Trim().ToUpper() == "DISCLAIM").Count(), }).FirstOrDefaultAsync(); if (placement == null) return Error(GlobalMessages.DataNotFound, 404); return Success(placement); } - if (org.result.isOfficer == true || role?.Trim().ToUpper() == "OWNER") + if (org.result.isOfficer == true) { var placement = await _context.Placements .Where(x => x.Id == examId) @@ -810,142 +797,57 @@ namespace BMA.EHR.Placement.Service.Controllers if (person == null) return Error(GlobalMessages.DataNotFound, 404); bool? _nullBool = null; - //person.PositionLevel = null; - //person.PositionType = null; - //person.Amount = null; - //person.MouthSalaryAmount = null; - //person.PositionSalaryAmount = null; - //person.RecruitDate = null; - //person.ReportingDate = null; + person.PositionLevel = null; + person.PositionType = null; + person.Amount = null; + person.MouthSalaryAmount = null; + person.PositionSalaryAmount = null; + person.RecruitDate = null; + person.ReportingDate = null; person.RejectReason = req.Note; person.PlacementStatus = "DISCLAIM"; person.LastUpdateFullName = FullName ?? "System Administrator"; person.LastUpdateUserId = UserId ?? ""; person.LastUpdatedAt = DateTime.Now; - //person.root = null; - //person.rootId = null; - //person.rootDnaId = null; - //person.rootShortName = null; - //person.child1 = null; - //person.child1Id = null; - //person.child1DnaId = null; - //person.child1ShortName = null; - //person.child2 = null; - //person.child2Id = null; - //person.child2Id = null; - //person.child2ShortName = null; - //person.child3 = null; - //person.child3Id = null; - //person.child3DnaId = null; - //person.child3ShortName = null; - //person.child4 = null; - //person.child4Id = null; - //person.child4DnaId = null; - //person.child4ShortName = null; - //person.orgRevisionId = null; - //person.posMasterNo = null; + person.root = null; + person.rootId = null; + person.rootDnaId = null; + person.rootShortName = null; + person.child1 = null; + person.child1Id = null; + person.child1DnaId = null; + person.child1ShortName = null; + person.child2 = null; + person.child2Id = null; + person.child2Id = null; + person.child2ShortName = null; + person.child3 = null; + person.child3Id = null; + person.child3DnaId = null; + person.child3ShortName = null; + person.child4 = null; + person.child4Id = null; + person.child4DnaId = null; + person.child4ShortName = null; + person.orgRevisionId = null; + person.posMasterNo = null; //person.positionName = null; - //person.positionField = null; - //person.posTypeId = null; - //person.posTypeName = null; - //person.posLevelId = null; - //person.posLevelName = null; - //person.node = null; - //person.nodeId = null; - //person.posmasterId = null; - //person.positionId = null; - //person.Draft = _nullBool; - //person.typeCommand = null; + person.positionField = null; + person.posTypeId = null; + person.posTypeName = null; + person.posLevelId = null; + person.posLevelName = null; + person.node = null; + person.nodeId = null; + person.posmasterId = null; + person.positionId = null; + person.Draft = _nullBool; + person.typeCommand = null; await _context.SaveChangesAsync(); return Success(); } - /// - /// API อัพเดทสถานะเป็นบรรจุ - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("pass/update-status")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> PersonUpdateStatus([FromBody] PersonUpdateStatusRequest req) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_PLACEMENT_PASS"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - string role = jsonData["result"]?.ToString(); - if (role != "OWNER") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - - var person = await _context.PlacementProfiles - .FirstOrDefaultAsync(x => x.Id == req.PersonalId); - if (person == null) - return Error(GlobalMessages.DataNotFound, 404); - - person.PlacementStatus = "DONE"; - person.LastUpdateFullName = FullName ?? "System Administrator"; - person.LastUpdateUserId = UserId ?? ""; - person.LastUpdatedAt = DateTime.Now; - - await _context.SaveChangesAsync(); - - return Success(); - } - - /// - /// API สำหรับยกเลิกการส่งตัว - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("update/draft-status")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> PersonUpdateDraftStatus([FromBody] PersonUpdateStatusRequest req) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_PLACEMENT_PASS"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - - string role = jsonData["result"]?.ToString(); - if (role != "OWNER") - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - - var person = await _context.PlacementProfiles - .FirstOrDefaultAsync(x => x.Id == req.PersonalId); - if (person == null) - return Error(GlobalMessages.DataNotFound, 404); - - if (person.PlacementStatus == "REPORT") - return Error("ไม่สามารถยกเลิกการส่งตัวได้ เนื่องจากส่งไปออกคำสั่งแล้ว"); - - if (person.PlacementStatus == "DONE") - return Error("ไม่สามารถยกเลิกการส่งตัวได้ เนื่องจากบรรจุไปแล้ว"); - - person.Draft = false; - person.LastUpdateFullName = FullName ?? "System Administrator"; - person.LastUpdateUserId = UserId ?? ""; - person.LastUpdatedAt = DateTime.Now; - await _context.SaveChangesAsync(); - return Success(); - } - [HttpGet("pass/deferment/{personalId:length(36)}")] public async Task> GetPersonDeferment(Guid personalId) { @@ -1009,7 +911,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -1044,11 +946,12 @@ namespace BMA.EHR.Placement.Service.Controllers person.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName; } + var apiUrlUpdate = $"{_configuration["API"]}/org/pos/officer/master/book"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new { posMasterId = req.posmasterId, @@ -1065,23 +968,20 @@ namespace BMA.EHR.Placement.Service.Controllers person.positionId = req.positionId; person.posMasterNo = req.posMasterNo; person.positionName = req.positionName; - person.posExecutiveId = req.posExecutiveId; person.PositionExecutive = req.posExecutiveName; - person.positionExecutiveField = req.positionExecutiveField; - person.positionArea = req.positionArea; person.positionField = req.positionField; person.posTypeId = req.posTypeId; person.posTypeName = req.posTypeName; person.posLevelId = req.posLevelId; person.posLevelName = req.posLevelName; - if (person.profileId != null && person.profileId != "") + if (person.profileId != null) { apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{person.profileId}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -1305,7 +1205,6 @@ namespace BMA.EHR.Placement.Service.Controllers { PlacementProfile = profile, EducationLevelId = req.EducationLevelId, - EducationLevelName = req.EducationLevelName, PositionPath = positionPath, Institute = req.Institute, Degree = req.Degree, @@ -1348,7 +1247,6 @@ namespace BMA.EHR.Placement.Service.Controllers return Error(GlobalMessages.EducationNotFound, 404); education.EducationLevelId = req.EducationLevelId; - education.EducationLevelName = req.EducationLevelName; education.PositionPath = positionPath; education.Institute = req.Institute; education.Degree = req.Degree; @@ -1420,7 +1318,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new { posMasterId = profile.posmasterId, @@ -1454,10 +1352,6 @@ namespace BMA.EHR.Placement.Service.Controllers profile.posTypeName = null; profile.posLevelId = null; profile.posLevelName = null; - profile.PositionExecutive = null; - profile.posExecutiveId = null; - profile.positionArea = null; - profile.positionExecutiveField = null; // profile.PositionLevel = null; // profile.PositionType = null; @@ -1736,7 +1630,7 @@ namespace BMA.EHR.Placement.Service.Controllers ExamNumber = p.ExamNumber == null ? "-" : p.ExamNumber.Value.ToString().ToThaiNumber(), PlacementName = $"{p.Placement.Name.ToThaiNumber()} ครั้งที่ {p.Placement.Round.ToThaiNumber()} {p.Placement.Year.ToThaiYear().ToString().ToThaiNumber()}", Oc = (p.positionName == null ? "" : $"{p.positionName}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + @@ -1745,11 +1639,11 @@ namespace BMA.EHR.Placement.Service.Controllers PositionType = p.posTypeName == null ? "-" : p.posTypeName, PositionLevel = p.posLevelName == null ? "-" : p.posLevelName, PositionNumber = p.posMasterNo == null ? "-" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-", Salary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), @@ -1761,8 +1655,8 @@ namespace BMA.EHR.Placement.Service.Controllers (p.child2 == null ? "" : $"{p.child2}\n") + (p.child1 == null ? "" : $"{p.child1}\n") + (p.root == null ? "" : $"{p.root}"), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -1815,27 +1709,16 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpPost("recruit/report/excecute")] public async Task> PostReportExecuteRecruit([FromBody] ReportExecuteRequest req) { - Console.WriteLine($"[RecruitReportExcecute] Starting execution at {DateTime.Now}"); - try { - Console.WriteLine($"[RecruitReportExcecute] Request received with {req?.refIds?.Length ?? 0} refIds"); - var placementProfile = await _context.PlacementProfiles .Include(x => x.PlacementCertificates) .Include(x => x.PlacementEducations) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - Console.WriteLine($"[RecruitReportExcecute] Found {placementProfile?.Count ?? 0} placement profiles"); - if (placementProfile == null) - { - Console.Error.WriteLine("[RecruitReportExcecute] PlacementProfile is null - returning NotFound"); return NotFound(); - } - - Console.WriteLine("[RecruitReportExcecute] Building resultData from placement profiles and refIds"); var resultData = (from p in placementProfile join r in req.refIds @@ -1859,10 +1742,10 @@ namespace BMA.EHR.Placement.Service.Controllers isLeave = false, dateRetire = (DateTime?)null, dateAppoint = r.commandDateAffect, - dateStart = p.ReportingDate, + dateStart = r.commandDateAffect, govAgeAbsent = 0, govAgePlus = 0, - birthDate = (p.DateOfBirth == null || p.DateOfBirth == DateTime.MinValue) ? (DateTime?)null : p.DateOfBirth, + birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth, reasonSameDate = (DateTime?)null, ethnicity = p.Race == null ? string.Empty : p.Race, telephoneNumber = p.Telephone == null ? string.Empty : Regex.Replace(p.Telephone, @"\D", ""), @@ -1871,16 +1754,16 @@ namespace BMA.EHR.Placement.Service.Controllers relationship = p.Relationship == null ? string.Empty : p.Relationship, religion = p.Religion == null ? string.Empty : p.Religion, bloodGroup = string.Empty, - registrationAddress = string.IsNullOrWhiteSpace(p.RegistAddress) ? string.Empty : p.RegistAddress, + registrationAddress = p.RegistAddress == null ? string.Empty : p.RegistAddress, registrationProvinceId = p.RegistProvinceId ?? null, registrationDistrictId = p.RegistDistrictId ?? null, registrationSubDistrictId = p.RegistSubDistrictId ?? null, - registrationZipCode = p.RegistZipCode == null ? null : p.RegistZipCode, - currentAddress = string.IsNullOrWhiteSpace(p.CurrentAddress) ? string.Empty : p.CurrentAddress, + registrationZipCode = p.RegistZipCode == null ? string.Empty : p.RegistZipCode, + currentAddress = p.CurrentAddress == null ? string.Empty : p.CurrentAddress, currentProvinceId = p.CurrentProvinceId ?? null, currentDistrictId = p.CurrentDistrictId ?? null, currentSubDistrictId = p.CurrentSubDistrictId ?? null, - currentZipCode = p.CurrentZipCode == null ? null : p.CurrentZipCode, + currentZipCode = p.CurrentZipCode == null ? string.Empty : p.CurrentZipCode, amount = r.amount, amountSpecial = r.amountSpecial, }, @@ -1892,13 +1775,13 @@ namespace BMA.EHR.Placement.Service.Controllers duration = e.Duration ?? string.Empty, durationYear = e.DurationYear ?? null, field = e.Field ?? string.Empty, - finishDate = (e.FinishDate == null || e.FinishDate == DateTime.MinValue) ? (DateTime?)null : e.FinishDate, + finishDate = e.FinishDate ?? null, fundName = e.FundName ?? string.Empty, gpa = e.Gpa ?? string.Empty, institute = e.Institute ?? string.Empty, other = e.Other ?? string.Empty, - startDate = (e.StartDate == null || e.StartDate == DateTime.MinValue) ? (DateTime?)null : e.StartDate, - endDate = (e.EndDate == null || e.EndDate == DateTime.MinValue) ? (DateTime?)null : e.EndDate, + startDate = e.StartDate ?? null, + endDate = e.EndDate ?? null, educationLevel = e.EducationLevelName, educationLevelId = e.EducationLevelId, positionPath = e.PositionPath?.Name ?? string.Empty, @@ -1910,8 +1793,8 @@ namespace BMA.EHR.Placement.Service.Controllers bodyCertificates = p.PlacementCertificates.Select(e => new { profileId = string.Empty, - expireDate = (e.ExpireDate == null || e.ExpireDate == DateTime.MinValue) ? (DateTime?)null : e.ExpireDate, - issueDate = (e.IssueDate == null || e.IssueDate == DateTime.MinValue) ? (DateTime?)null : e.IssueDate, + expireDate = e.ExpireDate ?? null, + issueDate = e.IssueDate ?? null, certificateNo = e.CertificateNo ?? string.Empty, certificateType = e.CertificateType ?? string.Empty, issuer = e.Issuer ?? string.Empty @@ -1923,9 +1806,7 @@ namespace BMA.EHR.Placement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutive, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, + positionExecutive = "", positionType = p.posTypeName, positionLevel = p.posLevelName, commandId = r.commandId, @@ -1952,112 +1833,44 @@ namespace BMA.EHR.Placement.Service.Controllers bodyPosition = new { posmasterId = p.posmasterId, - positionId = p.positionId, - positionName = p.positionName, - positionField = p.positionField, - posTypeId = p.posTypeId, - posLevelId = p.posLevelId, - posExecutiveId = p.posExecutiveId, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, - }, - bodyMarry = new - { - marry = p.Marry, - marryPrefix = p.MarryPrefix, - marryFirstName = p.MarryFirstName, - marryLastName = p.MarryLastName, - marryOccupation = p.MarryOccupation, - marryNationality = p.MarryNationality, - }, - bodyFather = new - { - fatherPrefix = p.FatherPrefix, - fatherFirstName = p.FatherFirstName, - fatherLastName = p.FatherLastName, - fatherOccupation = p.FatherOccupation, - fatherNationality = p.FatherNationality, - }, - bodyMother = new - { - motherPrefix = p.MotherPrefix, - motherFirstName = p.MotherFirstName, - motherLastName = p.MotherLastName, - motherOccupation = p.MotherOccupation, - motherNationality = p.MotherNationality, - }, + positionId = p.positionId + } }).ToList(); - Console.WriteLine($"[RecruitReportExcecute] resultData built successfully with {resultData?.Count ?? 0} records"); - #region Old: Circular Flow - // Console.WriteLine($"[RecruitReportExcecute] Calling external API: {_configuration["API"]}/org/command/excexute/create-officer-profile"); - // var apiUrl = $"{_configuration["API"]}/org/command/excexute/create-officer-profile"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); - // var _res = await client.PostAsJsonAsync(apiUrl, new - // { - // data = resultData - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // Console.WriteLine($"[RecruitReportExcecute] External API response status: {_res.StatusCode}"); - // if (_res.IsSuccessStatusCode) - // { - // Console.WriteLine("[RecruitReportExcecute] External API call successful - updating placement profiles"); - // placementProfile.ForEach(profile => - // { - // profile.PlacementStatus = "DONE"; - // if (req.refIds.Length > 0) - // { - // profile.commandId = req.refIds[0].commandId; - // profile.refCommandCode = req.refIds[0].commandCode; - // profile.refCommandDate = req.refIds[0].commandDateAffect; - // profile.refCommandName = req.refIds[0].commandName; - // profile.refCommandNo = $"{req.refIds[0].commandNo}/{req.refIds[0].commandYear.ToThaiYear()}"; - // profile.templateDoc = req.refIds[0].remark; - // } - // }); - // Console.WriteLine($"[RecruitReportExcecute] Saving changes to database for {placementProfile.Count} profiles"); - // await _context.SaveChangesAsync(); - // Console.WriteLine("[RecruitReportExcecute] Database save completed successfully"); - // } - // else - // { - // Console.Error.WriteLine($"[RecruitReportExcecute] External API call failed with status: {_res.StatusCode}"); - // Console.Error.WriteLine($"[RecruitReportExcecute] Response content: {_result}"); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - placementProfile.ForEach(profile => + var apiUrl = $"{_configuration["API"]}/org/command/excexute/create-officer-profile"; + using (var client = new HttpClient()) { - profile.PlacementStatus = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - if (req.refIds.Length > 0) + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); + var _res = await client.PostAsJsonAsync(apiUrl, new { - profile.commandId = req.refIds[0].commandId; - profile.refCommandCode = req.refIds[0].commandCode; - profile.refCommandDate = req.refIds[0].commandDateAffect; - profile.refCommandName = req.refIds[0].commandName; - profile.refCommandNo = $"{req.refIds[0].commandNo}/{req.refIds[0].commandYear.ToThaiYear()}"; - profile.templateDoc = req.refIds[0].remark; + data = resultData + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + placementProfile.ForEach(profile => + { + profile.PlacementStatus = "DONE"; + if (req.refIds.Length > 0) + { + profile.commandId = req.refIds[0].commandId; + profile.refCommandCode = req.refIds[0].commandCode; + profile.refCommandDate = req.refIds[0].commandDateAffect; + profile.refCommandName = req.refIds[0].commandName; + profile.refCommandNo = $"{req.refIds[0].commandNo}/{req.refIds[0].commandYear.ToThaiYear()}"; + profile.templateDoc = req.refIds[0].remark; + } + }); + await _context.SaveChangesAsync(); } - }); - Console.WriteLine($"[RecruitReportExcecute] Saving changes to database for {placementProfile.Count} profiles"); - await _context.SaveChangesAsync(); - Console.WriteLine($"[RecruitReportExcecute] Process completed successfully at {DateTime.Now}"); - return Success(resultData); + } + + return Success(); } - catch (Exception ex) + catch { - Console.Error.WriteLine($"[RecruitReportExcecute] Error occurred: {ex.Message}"); - Console.Error.WriteLine($"[RecruitReportExcecute] Stack trace: {ex.StackTrace}"); throw; } } @@ -2104,7 +1917,7 @@ namespace BMA.EHR.Placement.Service.Controllers .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.PlacementStatus.ToUpper() == "REPORT") .ToListAsync(); - placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN"); + placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAI"); await _context.SaveChangesAsync(); return Success(); } @@ -2148,7 +1961,7 @@ namespace BMA.EHR.Placement.Service.Controllers ExamNumber = p.ExamNumber == null ? "-" : p.ExamNumber.Value.ToString().ToThaiNumber(), PlacementName = $"{p.Placement.Name.ToThaiNumber()} ครั้งที่ {p.Placement.Round.ToThaiNumber()} {p.Placement.Year.ToThaiYear().ToString().ToThaiNumber()}", Oc = (p.positionName == null ? "" : $"{p.positionName}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + @@ -2157,17 +1970,17 @@ namespace BMA.EHR.Placement.Service.Controllers PositionType = p.posTypeName == null ? "-" : p.posTypeName, PositionLevel = p.posLevelName == null ? "-" : p.posLevelName, PositionNumber = p.posMasterNo == null ? "-" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-", Salary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), PositionCandidate = p.PositionCandidate, - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -2219,27 +2032,16 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpPost("candidate/report/excecute")] public async Task> PostReportExecuteCandidate([FromBody] ReportExecuteRequest req) { - Console.WriteLine($"[CandidateReportExcecute] Starting execution at {DateTime.Now}"); - try { - Console.WriteLine($"[CandidateReportExcecute] Request received with {req?.refIds?.Length ?? 0} refIds"); var placementProfile = await _context.PlacementProfiles .Include(x => x.PlacementCertificates) .Include(x => x.PlacementEducations) - .Include(x => x.ProfileImg) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - Console.WriteLine($"[CandidateReportExcecute] Found {placementProfile?.Count ?? 0} placement profiles"); - if (placementProfile == null) - { - Console.Error.WriteLine("[CandidateReportExcecute] PlacementProfile is null - returning NotFound"); return NotFound(); - } - - Console.WriteLine("[CandidateReportExcecute] Building resultData from placement profiles and refIds"); var resultData = (from p in placementProfile join r in req.refIds @@ -2266,7 +2068,7 @@ namespace BMA.EHR.Placement.Service.Controllers dateStart = r.commandDateAffect, govAgeAbsent = 0, govAgePlus = 0, - birthDate = (p.DateOfBirth == null || p.DateOfBirth == DateTime.MinValue) ? (DateTime?)null : p.DateOfBirth, + birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth, reasonSameDate = (DateTime?)null, ethnicity = p.Race == null ? string.Empty : p.Race, telephoneNumber = p.Telephone == null ? string.Empty : p.Telephone, @@ -2275,23 +2077,18 @@ namespace BMA.EHR.Placement.Service.Controllers relationship = p.Relationship == null ? string.Empty : p.Relationship, religion = p.Religion == null ? string.Empty : p.Religion, bloodGroup = p.BloodGroup, - registrationAddress = string.IsNullOrWhiteSpace(p.RegistAddress) ? string.Empty : p.RegistAddress, - registrationProvinceId = p.RegistProvinceId ?? null, - registrationDistrictId = p.RegistDistrictId ?? null, - registrationSubDistrictId = p.RegistSubDistrictId ?? null, - registrationZipCode = p.RegistZipCode == null ? null : p.RegistZipCode, - currentAddress = p.RegistSame == true - ? (string.IsNullOrWhiteSpace(p.RegistAddress) ? string.Empty : p.RegistAddress) - : (string.IsNullOrWhiteSpace(p.CurrentAddress) ? string.Empty : p.CurrentAddress), - currentProvinceId = p.RegistSame == true ? p.RegistProvinceId : p.CurrentProvinceId, - currentDistrictId = p.RegistSame == true ? p.RegistDistrictId : p.CurrentDistrictId, - currentSubDistrictId = p.RegistSame == true ? p.RegistSubDistrictId : p.CurrentSubDistrictId, - currentZipCode = p.RegistSame == true - ? p.RegistZipCode == null ? null : p.RegistZipCode - : p.CurrentZipCode == null ? null : p.CurrentZipCode, + registrationAddress = p.RegistAddress == null ? string.Empty : p.RegistAddress, + registrationProvinceId = p.RegistProvinceId, + registrationDistrictId = p.RegistDistrictId, + registrationSubDistrictId = p.RegistSubDistrictId, + registrationZipCode = p.RegistZipCode == null ? string.Empty : p.RegistZipCode, + currentAddress = p.CurrentAddress == null ? string.Empty : p.CurrentAddress, + currentProvinceId = p.CurrentProvinceId, + currentDistrictId = p.CurrentDistrictId, + currentSubDistrictId = p.CurrentSubDistrictId, + currentZipCode = p.CurrentZipCode == null ? string.Empty : p.CurrentZipCode, amount = r.amount, amountSpecial = r.amountSpecial, - objectRefId = p.ProfileImg != null && p.ProfileImg?.ObjectRefId != null ? p.ProfileImg?.ObjectRefId.ToString("D") : null, }, bodyEducations = p.PlacementEducations.Select(e => new { @@ -2332,9 +2129,7 @@ namespace BMA.EHR.Placement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutive, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, + positionExecutive = "", positionType = p.posTypeName, positionLevel = p.posLevelName, commandId = r.commandId, @@ -2361,114 +2156,47 @@ namespace BMA.EHR.Placement.Service.Controllers bodyPosition = new { posmasterId = p.posmasterId, - positionId = p.positionId, - positionName = p.positionName, - positionField = p.positionField, - posTypeId = p.posTypeId, - posLevelId = p.posLevelId, - posExecutiveId = p.posExecutiveId, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, - }, - bodyMarry = new - { - marry = p.Marry, - marryPrefix = p.MarryPrefix, - marryFirstName = p.MarryFirstName, - marryLastName = p.MarryLastName, - marryOccupation = p.MarryOccupation, - marryNationality = p.MarryNationality, - }, - bodyFather = new - { - fatherPrefix = p.FatherPrefix, - fatherFirstName = p.FatherFirstName, - fatherLastName = p.FatherLastName, - fatherOccupation = p.FatherOccupation, - fatherNationality = p.FatherNationality, - }, - bodyMother = new - { - motherPrefix = p.MotherPrefix, - motherFirstName = p.MotherFirstName, - motherLastName = p.MotherLastName, - motherOccupation = p.MotherOccupation, - motherNationality = p.MotherNationality, - }, + positionId = p.positionId + } }).ToList(); - Console.WriteLine($"[CandidateReportExcecute] resultData built successfully with {resultData?.Count ?? 0} records"); - - #region Old: Circular Flow - // Console.WriteLine($"[CandidateReportExcecute] Calling external API: {_configuration["API"]}/org/command/excexute/create-officer-profile"); - // var apiUrl = $"{_configuration["API"]}/org/command/excexute/create-officer-profile"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); - // var _res = await client.PostAsJsonAsync(apiUrl, new - // { - // data = resultData - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // Console.WriteLine($"[CandidateReportExcecute] External API response status: {_res.StatusCode}"); - // if (_res.IsSuccessStatusCode) - // { - // Console.WriteLine("[CandidateReportExcecute] External API call successful - updating placement profiles"); - // placementProfile.ForEach(profile => - // { - // profile.PlacementStatus = "DONE"; - // if (req.refIds.Length > 0) - // { - // profile.commandId = req.refIds[0].commandId; - // profile.refCommandCode = req.refIds[0].commandCode; - // profile.refCommandDate = req.refIds[0].commandDateAffect; - // profile.refCommandName = req.refIds[0].commandName; - // profile.refCommandNo = $"{req.refIds[0].commandNo}/{req.refIds[0].commandYear.ToThaiYear()}"; - // profile.templateDoc = req.refIds[0].remark; - // } - // }); - // Console.WriteLine($"[CandidateReportExcecute] Saving changes to database for {placementProfile.Count} profiles"); - // await _context.SaveChangesAsync(); - // Console.WriteLine("[CandidateReportExcecute] Database save completed successfully"); - // } - // else - // { - // Console.Error.WriteLine($"[CandidateReportExcecute] External API call failed with status: {_res.StatusCode}"); - // Console.Error.WriteLine($"[CandidateReportExcecute] Response content: {_result}"); - // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - placementProfile.ForEach(profile => + var apiUrl = $"{_configuration["API"]}/org/command/excexute/create-officer-profile"; + using (var client = new HttpClient()) { - profile.PlacementStatus = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - if (req.refIds.Length > 0) + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); + var _res = await client.PostAsJsonAsync(apiUrl, new { - profile.commandId = req.refIds[0].commandId; - profile.refCommandCode = req.refIds[0].commandCode; - profile.refCommandDate = req.refIds[0].commandDateAffect; - profile.refCommandName = req.refIds[0].commandName; - profile.refCommandNo = $"{req.refIds[0].commandNo}/{req.refIds[0].commandYear.ToThaiYear()}"; - profile.templateDoc = req.refIds[0].remark; + data = resultData + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + placementProfile.ForEach(profile => + { + profile.PlacementStatus = "DONE"; + if (req.refIds.Length > 0) + { + profile.commandId = req.refIds[0].commandId; + profile.refCommandCode = req.refIds[0].commandCode; + profile.refCommandDate = req.refIds[0].commandDateAffect; + profile.refCommandName = req.refIds[0].commandName; + profile.refCommandNo = $"{req.refIds[0].commandNo}/{req.refIds[0].commandYear.ToThaiYear()}"; + profile.templateDoc = req.refIds[0].remark; + } + }); + await _context.SaveChangesAsync(); } - }); - Console.WriteLine($"[CandidateReportExcecute] Saving changes to database for {placementProfile.Count} profiles"); - await _context.SaveChangesAsync(); - Console.WriteLine($"[CandidateReportExcecute] Process completed successfully at {DateTime.Now}"); - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + } + + // // update placementstatus + // placementProfile.ForEach(profile => profile.PlacementStatus = "DONE"); + // await _context.SaveChangesAsync(); + return Success(); } - catch (Exception ex) + catch { - Console.Error.WriteLine($"[CandidateReportExcecute] Error occurred: {ex.Message}"); - Console.Error.WriteLine($"[CandidateReportExcecute] Stack trace: {ex.StackTrace}"); throw; } } @@ -2554,12 +2282,10 @@ namespace BMA.EHR.Placement.Service.Controllers { No = r.Sequence.ToString().ToThaiNumber(), FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", - // Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" : - // p.PlacementEducations.FirstOrDefault().Degree, Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" : - $"{p.PlacementEducations.FirstOrDefault().Degree} {p.PlacementEducations.FirstOrDefault().Field}", + p.PlacementEducations.FirstOrDefault().Degree, OldOc = (p.positionNameOld == null ? "" : $"{p.positionNameOld}\n") + - (p.PositionExecutiveOld == null ? "" : (p.positionExecutiveFieldOld == null ? $"{p.PositionExecutiveOld}\n" : $"{p.PositionExecutiveOld}({p.positionExecutiveFieldOld})\n")) + + (p.PositionExecutiveOld == null ? "" : $"{p.PositionExecutiveOld}\n") + (p.child4Old == null ? "" : $"{p.child4Old}\n") + (p.child3Old == null ? "" : $"{p.child3Old}\n") + (p.child2Old == null ? "" : $"{p.child2Old}\n") + @@ -2568,15 +2294,15 @@ namespace BMA.EHR.Placement.Service.Controllers OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld, OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld, OldPositionNumber = p.posMasterNoOld == null ? "-" : - p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "-", + p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-", OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), OldPosition = p.positionNameOld == null ? "-" : p.positionNameOld, NewOc = (p.positionName == null ? "" : $"{p.positionName}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + @@ -2586,16 +2312,16 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, NewPositionNumber = p.posMasterNo == null ? "-" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -2652,8 +2378,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementProfiles .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -2664,17 +2388,11 @@ namespace BMA.EHR.Placement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutive, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, - positionTypeId = p.posTypeId, + positionExecutive = "", positionType = p.posTypeName, - positionLevelId = p.posLevelId, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -2697,39 +2415,24 @@ namespace BMA.EHR.Placement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // //// var _result = await _res.Content.ReadAsStringAsync(); - // //// if (_res.IsSuccessStatusCode) - // //// { - // //// data.ForEach(profile => profile.PlacementStatus = "DONE"); - // //// await _context.SaveChangesAsync(); - // //// } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; + using (var client = new HttpClient()) { - profile.PlacementStatus = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.PlacementStatus = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -2811,12 +2514,10 @@ namespace BMA.EHR.Placement.Service.Controllers { No = r.Sequence.ToString().ToThaiNumber(), FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", - // Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" : - // p.PlacementEducations.FirstOrDefault().Degree, Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" : - $"{p.PlacementEducations.FirstOrDefault().Degree} {p.PlacementEducations.FirstOrDefault().Field}", + p.PlacementEducations.FirstOrDefault().Degree, OldOc = (p.positionNameOld == null ? "" : $"{p.positionNameOld}\n") + - (p.PositionExecutiveOld == null ? "" : (p.positionExecutiveFieldOld == null ? $"{p.PositionExecutiveOld}\n" : $"{p.PositionExecutiveOld}({p.positionExecutiveFieldOld})\n")) + + (p.PositionExecutiveOld == null ? "" : $"{p.PositionExecutiveOld}\n") + (p.child4Old == null ? "" : $"{p.child4Old}\n") + (p.child3Old == null ? "" : $"{p.child3Old}\n") + (p.child2Old == null ? "" : $"{p.child2Old}\n") + @@ -2826,14 +2527,14 @@ namespace BMA.EHR.Placement.Service.Controllers OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld, OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld, OldPositionNumber = p.posMasterNoOld == null ? "-" : - p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "-", + p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-", OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), NewOc = (p.positionName == null ? "" : $"{p.positionName}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + @@ -2843,16 +2544,16 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, NewPositionNumber = p.posMasterNo == null ? "-" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -2909,8 +2610,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementProfiles .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -2921,17 +2620,11 @@ namespace BMA.EHR.Placement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutive, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, - positionTypeId = p.posTypeId, + positionExecutive = "", positionType = p.posTypeName, - positionLevelId = p.posLevelId, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -2954,39 +2647,24 @@ namespace BMA.EHR.Placement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // //// var _result = await _res.Content.ReadAsStringAsync(); - // //// if (_res.IsSuccessStatusCode) - // //// { - // //// data.ForEach(profile => profile.PlacementStatus = "DONE"); - // //// await _context.SaveChangesAsync(); - // //// } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; + using (var client = new HttpClient()) { - profile.PlacementStatus = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.PlacementStatus = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -3057,12 +2735,10 @@ namespace BMA.EHR.Placement.Service.Controllers { No = r.Sequence.ToString().ToThaiNumber(), FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", - // Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" : - // p.PlacementEducations.FirstOrDefault().Degree, Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" : - $"{p.PlacementEducations.FirstOrDefault().Degree} {p.PlacementEducations.FirstOrDefault().Field}", + p.PlacementEducations.FirstOrDefault().Degree, OldOc = (p.positionNameOld == null ? "" : $"{p.positionNameOld}\n") + - (p.PositionExecutiveOld == null ? "" : (p.positionExecutiveFieldOld == null ? $"{p.PositionExecutiveOld}\n" : $"{p.PositionExecutiveOld}({p.positionExecutiveFieldOld})\n")) + + (p.PositionExecutiveOld == null ? "" : $"{p.PositionExecutiveOld}\n") + (p.child4Old == null ? "" : $"{p.child4Old}\n") + (p.child3Old == null ? "" : $"{p.child3Old}\n") + (p.child2Old == null ? "" : $"{p.child2Old}\n") + @@ -3071,15 +2747,15 @@ namespace BMA.EHR.Placement.Service.Controllers OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld, OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld, OldPositionNumber = p.posMasterNoOld == null ? "-" : - p.nodeOld == "4" ? $"{p.child4ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "3" ? $"{p.child3ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "2" ? $"{p.child2ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "1" ? $"{p.child1ShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "0" ? $"{p.rootShortNameOld} {p.posMasterNoOld}".ToThaiNumber() : "-", + p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-", OldSalary = p.Amount == null ? "-" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), LeaveDate = "-", NewOc = (p.positionName == null ? "" : $"{p.positionName}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + @@ -3088,15 +2764,15 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, NewPositionNumber = p.posMasterNo == null ? "-" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "-", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -3151,8 +2827,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementProfiles .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -3163,15 +2837,11 @@ namespace BMA.EHR.Placement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutive, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, + positionExecutive = "", positionType = p.posTypeName, positionLevel = p.posLevelName, posmasterId = p.posmasterId, positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, commandId = r.commandId, orgRoot = p.root, orgChild1 = p.child1, @@ -3194,39 +2864,24 @@ namespace BMA.EHR.Placement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // //// var _result = await _res.Content.ReadAsStringAsync(); - // //// if (_res.IsSuccessStatusCode) - // //// { - // //// data.ForEach(profile => profile.PlacementStatus = "DONE"); - // //// await _context.SaveChangesAsync(); - // //// } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; + using (var client = new HttpClient()) { - profile.PlacementStatus = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.PlacementStatus = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -3812,8 +3467,6 @@ namespace BMA.EHR.Placement.Service.Controllers RegisterDate = candidate.GetType().GetProperty("RegisterDate").GetValue(candidate), Url = picContent ?? "https://bma-ehr.frappet.synology.me/assets/avatar_user-89f22423.jpg", Careers = careers, - IsBachelors = candidate.GetType().GetProperty("IsBachelors").GetValue(candidate), - EditorConfirms = candidate.GetType().GetProperty("EditorConfirms").GetValue(candidate) }; var data = new diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs index 29d38df5..a84aec2c 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs @@ -1,6 +1,5 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Models.Placement; @@ -32,7 +31,6 @@ namespace BMA.EHR.Placement.Service.Controllers private readonly MinIOService _documentService; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; public PlacementOfficerController(PlacementRepository repository, @@ -41,7 +39,6 @@ namespace BMA.EHR.Placement.Service.Controllers MinIOService documentService, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - UserProfileRepository userProfileRepository, PermissionRepository permission) { _repository = repository; @@ -50,7 +47,6 @@ namespace BMA.EHR.Placement.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _configuration = configuration; - _userProfileRepository = userProfileRepository; _permission = permission; } @@ -60,7 +56,6 @@ namespace BMA.EHR.Placement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -75,48 +70,17 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet()] public async Task> GetListByAdmin(string? status = "ALL") { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_TEMPDUTY"); + var getPermission = await _permission.GetPermissionOrgAPIAsync("LIST", "SYS_TEMPDUTY", UserId); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; + // string?[] rootId = jsonData?.result?.rootId ?? null; + // string?[] child1Id = jsonData?.result?.child1Id ?? null; + // string?[] child2Id = jsonData?.result?.child2Id ?? null; + // string?[] child3Id = jsonData?.result?.child3Id ?? null; + // string?[] child4Id = jsonData?.result?.child4Id ?? null; var placementOfficers = await _context.PlacementOfficers.AsQueryable() // .Where(x => rootId == null ? true : rootId.Contains(x.rootOldId)) // .Where(x => child1Id == null ? true : child1Id.Contains(x.child1OldId)) @@ -148,10 +112,7 @@ namespace BMA.EHR.Placement.Service.Controllers p.child4OldId, p.child4ShortNameOld, p.PositionOld, - p.PositionNumberOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.posMasterNoOld, p.posTypeOldId, p.posTypeNameOld, @@ -165,51 +126,10 @@ namespace BMA.EHR.Placement.Service.Controllers p.Organization, p.OrganizationPositionOld, p.IsActive, - p.rootDnaOldId, - p.child1DnaOldId, - p.child2DnaOldId, - p.child3DnaOldId, - p.child4DnaOldId, }) .ToListAsync(); if (status != null && status.Trim().ToUpper() != "ALL") placementOfficers = placementOfficers.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - placementOfficers = placementOfficers - .Where(x => node == 4 ? x.child4DnaOldId == nodeId : (node == 3 ? x.child3DnaOldId == nodeId : (node == 2 ? x.child2DnaOldId == nodeId : (node == 1 ? x.child1DnaOldId == nodeId : (node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - placementOfficers = placementOfficers - .Where(x => node == 4 ? x.child3DnaOldId == nodeId : (node == 3 ? x.child2DnaOldId == nodeId : (node == 2 ? x.child1DnaOldId == nodeId : (node == 1 || node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - placementOfficers = placementOfficers - .Where(x => x.rootDnaOldId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // placementOfficers = placementOfficers - // .Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList(); - // } - else if (role == "NORMAL") - { - placementOfficers = placementOfficers.Where(x => - node == 0 ? x.rootDnaOldId == nodeId && x.child1DnaOldId == null : - node == 1 ? x.child1DnaOldId == nodeId && x.child2DnaOldId == null : - node == 2 ? x.child2DnaOldId == nodeId && x.child3DnaOldId == null : - node == 3 ? x.child3DnaOldId == nodeId && x.child4DnaOldId == null : - node == 4 ? x.child4DnaOldId == nodeId : - true - ).ToList(); - } return Success(placementOfficers); } @@ -224,12 +144,11 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet("keycloak")] public async Task> GetListByKeycloak() { - // var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; - var apiUrl = $"{_configuration["API"]}/org/dotnet/get-profileId"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -266,8 +185,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.child4ShortNameOld, p.PositionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.posMasterNoOld, p.posTypeOldId, p.posTypeNameOld, @@ -326,8 +243,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.child4ShortNameOld, p.PositionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.posMasterNoOld, p.posTypeOldId, p.posTypeNameOld, @@ -408,8 +323,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.OrganizationPositionOld, p.PositionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.OrganizationOld, p.IsActive, }) @@ -447,7 +360,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -490,20 +403,15 @@ namespace BMA.EHR.Placement.Service.Controllers placementOfficer.PositionOld = org.result.position; placementOfficer.PositionExecutiveOld = org.result.posExecutiveName; - placementOfficer.positionExecutiveFieldOld = org.result.positionExecutiveField; - placementOfficer.positionAreaOld = org.result.positionArea; placementOfficer.PositionLevelOld = org.result.posLevelName; placementOfficer.PositionTypeOld = org.result.posTypeName; - placementOfficer.PositionNumberOld = org.result.posNo; + placementOfficer.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; placementOfficer.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + (org.result.child1 == null ? "" : org.result.child1 + "\n") + (org.result.root == null ? "" : org.result.root); - placementOfficer.OrganizationPositionOld = org.result.position + "\n" + - (placementOfficer.PositionExecutiveOld == null ? "" : (placementOfficer.positionExecutiveField == null ? placementOfficer.PositionExecutiveOld + "\n" : placementOfficer.PositionExecutiveOld + "(" + placementOfficer.positionExecutiveField + ")" + "\n")) - + placementOfficer.OrganizationOld; - + placementOfficer.OrganizationPositionOld = org.result.position + "\n" + (placementOfficer.PositionExecutiveOld == null ? "" : placementOfficer.PositionExecutiveOld + "\n") + placementOfficer.OrganizationOld; } await _context.PlacementOfficers.AddAsync(placementOfficer); await _context.SaveChangesAsync(); @@ -711,8 +619,8 @@ namespace BMA.EHR.Placement.Service.Controllers StartDate = p.DateStart == null ? "" : p.DateStart.Value.ToThaiShortDate2().ToThaiNumber(), EndDate = p.DateEnd == null ? "" : p.DateEnd.Value.ToThaiShortDate2().ToThaiNumber(), Reason = p.Reason == null ? "" : p.Reason.ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -759,7 +667,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementOfficers .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -771,9 +678,7 @@ namespace BMA.EHR.Placement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutiveOld, - positionExecutiveField = p.positionExecutiveFieldOld, - positionArea = p.positionAreaOld, + positionExecutive = "", positionType = p.PositionTypeOld, positionLevel = p.PositionLevelOld, commandId = r.commandId, @@ -801,46 +706,29 @@ namespace BMA.EHR.Placement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // //// var _result = await _res.Content.ReadAsStringAsync(); - // //// if (_res.IsSuccessStatusCode) - // //// { - // //// foreach (var profile in data) - // //// { - // //// profile.Status = "DONE"; - // //// profile.commandNo = resultData.Count > 0 ? $"{resultData[0].commandNo}/{resultData[0].commandYear.ToThaiYear()}" : null; - // //// } - // //// await _context.SaveChangesAsync(); - // //// } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var firstRef = req.refIds.FirstOrDefault(); - var commandNoText = firstRef != null ? $"{firstRef.commandNo}/{firstRef.commandYear.ToThaiYear()}" : null; - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.commandNo = commandNoText; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + //data.ForEach(profile => profile.Status = "DONE"); + foreach (var profile in data) + { + profile.Status = "DONE"; + profile.commandNo = resultData.Count > 0 ? $"{resultData[0].commandNo}/{resultData[0].commandYear.ToThaiYear()}" : null; + } + await _context.SaveChangesAsync(); + } + } + return Success(); } } } diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs index 31db814b..e4a39d58 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs @@ -15,7 +15,6 @@ using Swashbuckle.AspNetCore.Annotations; using System.Net.Http.Headers; using System.Security.Claims; using System.Reflection; -using BMA.EHR.Application.Responses.Profiles; namespace BMA.EHR.Placement.Service.Controllers { @@ -33,7 +32,6 @@ namespace BMA.EHR.Placement.Service.Controllers private readonly MinIOService _documentService; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; public PlacementReceiveController(PlacementRepository repository, @@ -42,7 +40,6 @@ namespace BMA.EHR.Placement.Service.Controllers MinIOService documentService, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - UserProfileRepository userProfileRepository, PermissionRepository permiss) { _repository = repository; @@ -51,7 +48,6 @@ namespace BMA.EHR.Placement.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _configuration = configuration; - _userProfileRepository = userProfileRepository; _permission = permiss; } @@ -61,7 +57,6 @@ namespace BMA.EHR.Placement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -76,48 +71,17 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet()] public async Task> GetListByAdmin(string? status = "ALL") { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_TRANSFER_RECEIVE"); + var getPermission = await _permission.GetPermissionOrgAPIAsync("LIST", "SYS_TRANSFER_RECEIVE", UserId); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; + // string?[] rootId = jsonData?.result?.rootId ?? null; + // string?[] child1Id = jsonData?.result?.child1Id ?? null; + // string?[] child2Id = jsonData?.result?.child2Id ?? null; + // string?[] child3Id = jsonData?.result?.child3Id ?? null; + // string?[] child4Id = jsonData?.result?.child4Id ?? null; var placementReceives = await _context.PlacementReceives.AsQueryable() // .Where(x => rootId == null ? true : rootId.Contains(x.rootOldId)) // .Where(x => child1Id == null ? true : child1Id.Contains(x.child1OldId)) @@ -129,7 +93,6 @@ namespace BMA.EHR.Placement.Service.Controllers { p.Id, p.prefix, - p.rank, p.firstName, p.lastName, p.citizenId, @@ -194,60 +157,16 @@ namespace BMA.EHR.Placement.Service.Controllers p.posMasterNoOld, p.PositionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.posTypeOldId, p.posTypeNameOld, p.posLevelOldId, p.posLevelNameOld, p.CreatedAt, - p.CreatedUserId, p.profileId, - p.rootDnaId, - p.child1DnaId, - p.child2DnaId, - p.child3DnaId, - p.child4DnaId, }) .ToListAsync(); if (status != null && status.Trim().ToUpper() != "ALL") placementReceives = placementReceives.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - placementReceives = placementReceives - .Where(x => (node == 4 ? x.child4DnaId == nodeId : (node == 3 ? x.child3DnaId == nodeId : (node == 2 ? x.child2DnaId == nodeId : (node == 1 ? x.child1DnaId == nodeId : (node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true)))))) || (x.CreatedUserId == UserId)).ToList(); - } - else if (role == "BROTHER") - { - placementReceives = placementReceives - .Where(x => node == 4 ? x.child3DnaId == nodeId : (node == 3 ? x.child2DnaId == nodeId : (node == 2 ? x.child1DnaId == nodeId : (node == 1 || node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - placementReceives = placementReceives - .Where(x => (x.rootDnaId == nodeId) || (x.CreatedUserId == UserId)).ToList(); - } - // else if (role == "PARENT") - // { - // placementReceives = placementReceives - // .Where(x => x.rootDnaId == nodeId && x.child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - placementReceives = placementReceives.Where(x => - node == 0 ? x.rootDnaId == nodeId && x.child1DnaId == null : - node == 1 ? x.child1DnaId == nodeId && x.child2DnaId == null : - node == 2 ? x.child2DnaId == nodeId && x.child3DnaId == null : - node == 3 ? x.child3DnaId == nodeId && x.child4DnaId == null : - node == 4 ? x.child4DnaId == nodeId : - true - ).ToList(); - } return Success(placementReceives); } @@ -281,7 +200,6 @@ namespace BMA.EHR.Placement.Service.Controllers // ProfileId = p.Profile.Id, p.citizenId, p.prefix, - p.rank, p.firstName, p.lastName, p.DateOfBirth, @@ -326,8 +244,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.AmountOld, p.PositionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.OrganizationOld, p.PositionTypeOld, p.PositionLevelOld, @@ -356,7 +272,7 @@ namespace BMA.EHR.Placement.Service.Controllers p.posLevelOldId, p.posLevelNameOld, - Avatar = p.Avatar == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Avatar.Id, + // Avatar = p.Avatar == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Avatar.Id, PlacementReceiveDocs = p.PlacementReceiveDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), }) .FirstOrDefaultAsync(); @@ -379,7 +295,6 @@ namespace BMA.EHR.Placement.Service.Controllers // data.ProfileId, data.citizenId, data.prefix, - data.rank, data.firstName, data.lastName, data.DateOfBirth, @@ -428,8 +343,6 @@ namespace BMA.EHR.Placement.Service.Controllers data.AmountOld, data.PositionOld, data.PositionExecutiveOld, - data.positionExecutiveFieldOld, - data.positionAreaOld, organizationOld = data.OrganizationOld == "/" || data.OrganizationOld == null ? null : data.OrganizationOld, data.PositionTypeOld, data.PositionLevelOld, @@ -458,7 +371,7 @@ namespace BMA.EHR.Placement.Service.Controllers data.posLevelOldId, data.posLevelNameOld, - Avatar = data.Avatar == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(data.Avatar), + // Avatar = data.Avatar == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(data.Avatar), Docs = placementReceiveDocs, }; @@ -487,7 +400,6 @@ namespace BMA.EHR.Placement.Service.Controllers // Profile = profile, citizenId = req.citizenId, prefix = req.prefix, - rank = req.rank, firstName = req.firstName, lastName = req.lastName, DateOfBirth = req.BirthDate, @@ -506,42 +418,47 @@ namespace BMA.EHR.Placement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - - var apiUrlCheckCitizen = $"{_configuration["API"]}/org/dotnet/check-citizen"; - - using (var client = new HttpClient()) - + if (placementReceive.citizenId.Length != 13) { + return Error("กรุณากรอกข้อมูลรหัสบัตรประจำตัวประชาชนให้ครบ 13 หลัก", 500); + } + int[] citizenIdDigits = placementReceive.citizenId.Select(c => int.Parse(c.ToString())).ToArray(); + int cal = + citizenIdDigits[0] * 13 + + citizenIdDigits[1] * 12 + + citizenIdDigits[2] * 11 + + citizenIdDigits[3] * 10 + + citizenIdDigits[4] * 9 + + citizenIdDigits[5] * 8 + + citizenIdDigits[6] * 7 + + citizenIdDigits[7] * 6 + + citizenIdDigits[8] * 5 + + citizenIdDigits[9] * 4 + + citizenIdDigits[10] * 3 + + citizenIdDigits[11] * 2; - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - Console.Write($"[PlacementReceiveController] Check-Citizen API-Key : {_configuration["API_KEY"]}"); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var _res = await client.PostAsJsonAsync(apiUrlCheckCitizen, new - - { - - placementReceive.citizenId - - }); - - var _result = await _res.Content.ReadAsStringAsync(); - - var jsonDataCheckCitizen = JsonConvert.DeserializeObject(_result); - - if (!_res.IsSuccessStatusCode) - - throw new Exception(jsonDataCheckCitizen?["message"]?.ToString()); + int calStp2 = cal % 11; + int chkDigit = 11 - calStp2; + if (chkDigit == 10) + { + chkDigit = 1; + } + else if (chkDigit == 11) + { + chkDigit = chkDigit % 10; } + if (citizenIdDigits[12] != chkDigit) + { + return Error("ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง", 500); + } - var avatarUrl = string.Empty; var apiUrl = $"{_configuration["API"]}/org/profile/citizenid/position/{req.citizenId}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - Console.Write("[PlacementReceiveController] Check-Position"); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -557,23 +474,18 @@ namespace BMA.EHR.Placement.Service.Controllers // placementReceive.citizenId = org.result.citizenId; placementReceive.rootOld = org.result.root; placementReceive.rootOldId = org.result.rootId; - placementReceive.rootDnaId = org.result.rootDnaId; placementReceive.rootShortNameOld = org.result.rootShortName; placementReceive.child1Old = org.result.child1; placementReceive.child1OldId = org.result.child1Id; - placementReceive.child1DnaId = org.result.child1DnaId; placementReceive.child1ShortNameOld = org.result.child1ShortName; placementReceive.child2Old = org.result.child2; placementReceive.child2OldId = org.result.child2Id; - placementReceive.child2DnaId = org.result.child2DnaId; placementReceive.child2ShortNameOld = org.result.child2ShortName; placementReceive.child3Old = org.result.child3; placementReceive.child3OldId = org.result.child3Id; - placementReceive.child4DnaId = org.result.child4DnaId; placementReceive.child3ShortNameOld = org.result.child3ShortName; placementReceive.child4Old = org.result.child4; placementReceive.child4OldId = org.result.child4Id; - placementReceive.child4DnaId = org.result.child4DnaId; placementReceive.child4ShortNameOld = org.result.child4ShortName; placementReceive.posMasterNoOld = org.result.posMasterNo; placementReceive.posTypeOldId = org.result.posTypeId; @@ -586,21 +498,15 @@ namespace BMA.EHR.Placement.Service.Controllers placementReceive.PositionOld = org.result.position; placementReceive.PositionExecutiveOld = org.result.posExecutiveName; - placementReceive.positionExecutiveFieldOld = org.result.positionExecutiveField; - placementReceive.positionAreaOld = org.result.positionArea; placementReceive.PositionLevelOld = org.result.posLevelName; placementReceive.PositionTypeOld = org.result.posTypeName; - placementReceive.PositionNumberOld = org.result.posNo; + placementReceive.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; placementReceive.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + (org.result.child1 == null ? "" : org.result.child1 + "\n") + (org.result.root == null ? "" : org.result.root); - placementReceive.OrganizationPositionOld = org.result.position + "\n" + - (placementReceive.PositionExecutiveOld == null ? "" : (placementReceive.positionExecutiveField == null ? placementReceive.PositionExecutiveOld + "\n" : placementReceive.PositionExecutiveOld + "(" + placementReceive.positionExecutiveField + ")" + "\n")) - + placementReceive.OrganizationOld; - - avatarUrl = org.result.avatarUrl ?? null; + placementReceive.OrganizationPositionOld = org.result.position + "\n" + (placementReceive.PositionExecutiveOld == null ? "" : placementReceive.PositionExecutiveOld + "\n") + placementReceive.OrganizationOld; } } await _context.PlacementReceives.AddAsync(placementReceive); @@ -618,20 +524,6 @@ namespace BMA.EHR.Placement.Service.Controllers placementReceive.Avatar = _doc; } } - else - { - if (avatarUrl != null && avatarUrl != "") - { - IFormFile imageFile = await _documentService.GetImageToFormFileAsync(avatarUrl); - var doc = await _documentService.UploadFileAsync(imageFile, imageFile.FileName); - var _doc = await _context.Documents.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == doc.Id); - if (_doc != null) - { - placementReceive.Avatar = _doc; - } - } - } await _context.SaveChangesAsync(); return Success(); @@ -727,7 +619,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -766,7 +658,7 @@ namespace BMA.EHR.Placement.Service.Controllers // using (var client = new HttpClient()) // { // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + // client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); // var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new // { // posMasterOldId = uppdated.posmasterId, @@ -782,9 +674,6 @@ namespace BMA.EHR.Placement.Service.Controllers uppdated.posMasterNo = req.posMasterNo; uppdated.position = req.positionName; uppdated.PositionExecutive = req.posExecutiveName; - uppdated.posExecutiveId = req.posExecutiveId; - uppdated.positionExecutiveField = req.positionExecutiveField; - uppdated.positionArea = req.positionArea; uppdated.positionField = req.positionField; uppdated.posTypeId = req.posTypeId; uppdated.posTypeName = req.posTypeName; @@ -822,33 +711,40 @@ namespace BMA.EHR.Placement.Service.Controllers .FirstOrDefaultAsync(x => x.Id == id); if (uppdated == null) return Error(GlobalMessages.PlacementReceiveNotFound, 404); - - var apiUrlCheckCitizen = $"{_configuration["API"]}/org/dotnet/check-citizen"; - - using (var client = new HttpClient()) - + if (req.citizenId.Length != 13) { + return Error("กรุณากรอกข้อมูลรหัสบัตรประจำตัวประชาชนให้ครบ 13 หลัก", 500); + } + int[] citizenIdDigits = req.citizenId.Select(c => int.Parse(c.ToString())).ToArray(); + int cal = + citizenIdDigits[0] * 13 + + citizenIdDigits[1] * 12 + + citizenIdDigits[2] * 11 + + citizenIdDigits[3] * 10 + + citizenIdDigits[4] * 9 + + citizenIdDigits[5] * 8 + + citizenIdDigits[6] * 7 + + citizenIdDigits[7] * 6 + + citizenIdDigits[8] * 5 + + citizenIdDigits[9] * 4 + + citizenIdDigits[10] * 3 + + citizenIdDigits[11] * 2; - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + int calStp2 = cal % 11; + int chkDigit = 11 - calStp2; - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - - var _res = await client.PostAsJsonAsync(apiUrlCheckCitizen, new - - { - - req.citizenId - - }); - - var _result = await _res.Content.ReadAsStringAsync(); - - var jsonDataCheckCitizen = JsonConvert.DeserializeObject(_result); - - if (!_res.IsSuccessStatusCode) - - throw new Exception(jsonDataCheckCitizen?["message"]?.ToString()); + if (chkDigit == 10) + { + chkDigit = 1; + } + else if (chkDigit == 11) + { + chkDigit = chkDigit % 10; + } + if (citizenIdDigits[12] != chkDigit) + { + return Error("ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง", 500); } uppdated.Relationship = req.Relationship; @@ -857,7 +753,6 @@ namespace BMA.EHR.Placement.Service.Controllers uppdated.Gender = req.Gender; uppdated.citizenId = req.citizenId; uppdated.prefix = req.prefix; - uppdated.rank = req.rank; uppdated.firstName = req.firstName; uppdated.lastName = req.lastName; uppdated.DateOfBirth = req.DateOfBirth; @@ -923,61 +818,6 @@ namespace BMA.EHR.Placement.Service.Controllers return Success(); } - /// - /// API ลบรายการรับโอน (ADMIN) - /// - /// Id รับโอน - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/{id:length(36)}")] - public async Task> DeleteForAdminAsync(Guid id) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("DELETE", "SYS_TRANSFER_RECEIVE"); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - // ตรวจสอบว่า role ต้องเป็น OWNER เท่านั้น - if (jsonData.result.privilege != "OWNER") - { - return Error("ไม่มีสิทธิ์ในการลบรายการรับโอน", StatusCodes.Status403Forbidden); - } - var deleted = await _context.PlacementReceives.AsQueryable() - .Include(x => x.PlacementReceiveDocs) - .ThenInclude(x => x.Document) - .FirstOrDefaultAsync(x => x.Id == id); - if (deleted == null) - return NotFound(); - - // ห้ามลบเฉพาะสถานะ REPORT, WAITING, DONE - if (new[] { "REPORT", "WAITING", "DONE" }.Contains(deleted.Status)) - { - return Error("ไม่สามารถลบรายการรับโอนสถานะนี้ได้"); - } - - var placementReceiveDocs = new List(); - foreach (var doc in deleted.PlacementReceiveDocs) - { - if (doc.Document != null) - placementReceiveDocs.Add(doc.Document.Id); - } - _context.PlacementReceiveDocs.RemoveRange(deleted.PlacementReceiveDocs); - await _context.SaveChangesAsync(); - _context.PlacementReceives.Remove(deleted); - foreach (var doc in placementReceiveDocs) - { - if (doc != null) - await _documentService.DeleteFileAsync(doc); - } - await _context.SaveChangesAsync(); - - return Success(); - } - - /// /// สั่งรายชื่อไปออกคำสั่ง /// @@ -1101,7 +941,7 @@ namespace BMA.EHR.Placement.Service.Controllers Education = p.EducationOld == null ? "-" : p.EducationOld, OldOrg = p.OrganizationPositionOld ?? "-", OldOc = (p.PositionOld == null ? "" : $"{p.PositionOld}\n") + - (p.PositionExecutiveOld == null ? "" : (p.positionExecutiveFieldOld == null ? $"{p.PositionExecutiveOld}\n" : $"{p.PositionExecutiveOld}({p.positionExecutiveFieldOld})\n")) + + (p.PositionExecutiveOld == null ? "" : $"{p.PositionExecutiveOld}\n") + (p.child4Old == null ? "" : $"{p.child4Old}\n") + (p.child3Old == null ? "" : $"{p.child3Old}\n") + (p.child2Old == null ? "" : $"{p.child2Old}\n") + @@ -1111,7 +951,7 @@ namespace BMA.EHR.Placement.Service.Controllers OldPositionLevel = p.PositionLevelOld ?? "-", OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), NewOc = (p.position == null ? "" : $"{p.position}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.PositionExecutive == null ? "" : $"{p.PositionExecutive}\n") + (p.child4 == null ? "" : $"{p.child4}\n") + (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + @@ -1120,16 +960,16 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, NewPositionNumber = p.posMasterNo == null ? "-" : - p.node == 4 ? $"{p.child4ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 3 ? $"{p.child3ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 2 ? $"{p.child2ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 1 ? $"{p.child1ShortName} {p.posMasterNo}".ToThaiNumber() : - p.node == 0 ? $"{p.rootShortName} {p.posMasterNo}".ToThaiNumber() : "", + p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() : + p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -1181,150 +1021,113 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpPost("command/report/excecute")] public async Task> PostReportExecute([FromBody] ReportExecuteRequest req) { - Console.WriteLine($"[ReceiveReportExcecute] Starting execution at {DateTime.Now}"); - try + var data = await _context.PlacementReceives + .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) + .ToListAsync(); + var resultData = (from p in data + join r in req.refIds + on p.Id.ToString() equals r.refId + select new + { + bodyProfile = new + { + rank = string.Empty, + prefix = p.prefix == null ? string.Empty : p.prefix, + firstName = p.firstName == null ? string.Empty : p.firstName, + lastName = p.lastName == null ? string.Empty : p.lastName, + citizenId = p.citizenId == null ? string.Empty : p.citizenId, + position = p.position == null ? string.Empty : p.position, + posLevelId = p.posLevelId == null ? string.Empty : p.posLevelId, + posTypeId = p.posTypeId == null ? string.Empty : p.posTypeId, + email = (String?)null, + phone = (String?)null, + keycloak = string.Empty, + isProbation = false, + isLeave = false, + dateRetire = (DateTime?)null, + dateAppoint = r.commandDateAffect, + dateStart = r.commandDateAffect, + govAgeAbsent = 0, + govAgePlus = 0, + birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth, + reasonSameDate = (DateTime?)null, + ethnicity = p.Race == null ? string.Empty : p.Race, + telephoneNumber = (String?)null, + nationality = p.Nationality == null ? string.Empty : p.Nationality, + gender = p.Gender == null ? string.Empty : p.Gender, + relationship = p.Relationship == null ? string.Empty : p.Relationship, + religion = p.Religion == null ? string.Empty : p.Religion, + bloodGroup = string.Empty, + registrationAddress = (String?)null, + registrationProvinceId = (String?)null, + registrationDistrictId = (String?)null, + registrationSubDistrictId = (String?)null, + registrationZipCode = (String?)null, + currentAddress = (String?)null, + currentProvinceId = (String?)null, + currentDistrictId = (String?)null, + currentSubDistrictId = (String?)null, + currentZipCode = (String?)null, + amount = r.amount, + amountSpecial = r.amountSpecial, + }, + bodySalarys = new + { + profileId = p.profileId, + amount = r.amount, + amountSpecial = r.amountSpecial, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, + positionExecutive = "", + positionType = p.posTypeName, + positionLevel = p.posLevelName, + commandId = r.commandId, + orgRoot = p.root, + orgChild1 = p.child1, + orgChild2 = p.child2, + orgChild3 = p.child3, + orgChild4 = p.child4, + commandNo = r.commandNo, + commandYear = r.commandYear, + posNo = p.posMasterNo?.ToString(), + posNoAbb = p.node == 4 ? $"{p.child4ShortName}" : + p.node == 3 ? $"{p.child3ShortName}" : + p.node == 2 ? $"{p.child2ShortName}" : + p.node == 1 ? $"{p.child1ShortName}" : + p.node == 0 ? $"{p.rootShortName}" : "", + commandDateAffect = r.commandDateAffect, + commandDateSign = r.commandDateSign, + positionName = p.position, + commandCode = r.commandCode, + commandName = r.commandName, + remark = r.remark, + }, + bodyPosition = new + { + posmasterId = p.posmasterId, + positionId = p.positionId + } + }).ToList(); + + var baseAPIOrg = _configuration["API"]; + //var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current"; + var apiUrlOrg = $"{_configuration["API"]}/org/command/excexute/create-officer-profile"; + using (var client = new HttpClient()) { - var data = await _context.PlacementReceives - .Include(x => x.Avatar) - .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) - .ToListAsync(); - - var resultData = (from p in data - join r in req.refIds - on p.Id.ToString() equals r.refId - select new - { - bodyProfile = new - { - rank = string.IsNullOrEmpty(p.rank) ? string.Empty : p.rank, - prefix = p.prefix == null ? string.Empty : p.prefix, - firstName = p.firstName == null ? string.Empty : p.firstName, - lastName = p.lastName == null ? string.Empty : p.lastName, - citizenId = p.citizenId == null ? string.Empty : p.citizenId, - position = p.position == null ? string.Empty : p.position, - posLevelId = p.posLevelId == null ? string.Empty : p.posLevelId, - posTypeId = p.posTypeId == null ? string.Empty : p.posTypeId, - email = (String?)null, - phone = p.TelephoneNumber == null ? string.Empty : p.TelephoneNumber, - keycloak = string.Empty, - isProbation = false, - isLeave = false, - dateRetire = (DateTime?)null, - dateAppoint = r.commandDateAffect, - dateStart = r.commandDateAffect, - govAgeAbsent = 0, - govAgePlus = 0, - birthDate = (p.DateOfBirth == null || p.DateOfBirth == DateTime.MinValue) ? (DateTime?)null : p.DateOfBirth, - reasonSameDate = (DateTime?)null, - ethnicity = p.Race == null ? string.Empty : p.Race, - telephoneNumber = (String?)null, - nationality = p.Nationality == null ? string.Empty : p.Nationality, - gender = p.Gender == null ? string.Empty : p.Gender, - relationship = p.Relationship == null ? string.Empty : p.Relationship, - religion = p.Religion == null ? string.Empty : p.Religion, - bloodGroup = p.BloodGroup == null ? string.Empty : p.BloodGroup, - registrationAddress = (String?)null, - registrationProvinceId = (String?)null, - registrationDistrictId = (String?)null, - registrationSubDistrictId = (String?)null, - registrationZipCode = (String?)null, - currentAddress = (String?)null, - currentProvinceId = (String?)null, - currentDistrictId = (String?)null, - currentSubDistrictId = (String?)null, - currentZipCode = (String?)null, - amount = r.amount, - amountSpecial = r.amountSpecial, - objectRefId = p.Avatar != null && p.Avatar?.ObjectRefId != null ? p.Avatar?.ObjectRefId.ToString("D") : null, - }, - bodySalarys = new - { - profileId = p.profileId, - amount = r.amount, - amountSpecial = r.amountSpecial, - positionSalaryAmount = r.positionSalaryAmount, - mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutive, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, - positionType = p.posTypeName, - positionLevel = p.posLevelName, - commandId = r.commandId, - orgRoot = p.root, - orgChild1 = p.child1, - orgChild2 = p.child2, - orgChild3 = p.child3, - orgChild4 = p.child4, - commandNo = r.commandNo, - commandYear = r.commandYear, - posNo = p.posMasterNo?.ToString(), - posNoAbb = p.node == 4 ? $"{p.child4ShortName}" : - p.node == 3 ? $"{p.child3ShortName}" : - p.node == 2 ? $"{p.child2ShortName}" : - p.node == 1 ? $"{p.child1ShortName}" : - p.node == 0 ? $"{p.rootShortName}" : "", - commandDateAffect = r.commandDateAffect, - commandDateSign = r.commandDateSign, - positionName = p.position, - commandCode = r.commandCode, - commandName = r.commandName, - remark = r.remark, - }, - bodyPosition = new - { - posmasterId = p.posmasterId, - positionId = p.positionId, - positionName = p.position, - positionField = p.positionField, - posTypeId = p.posTypeId, - posLevelId = p.posLevelId, - posExecutiveId = p.posExecutiveId, - positionExecutiveField = p.positionExecutiveField, - positionArea = p.positionArea, - } - }).ToList(); - - Console.WriteLine($"[ReceiveReportExcecute] resultData built successfully with {resultData?.Count ?? 0} records"); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{_configuration["API"]}/org/command/excexute/create-officer-profile"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // // // var _result = await _res.Content.ReadAsStringAsync(); - // // // if (_res.IsSuccessStatusCode) - // // // { - // // // data.ForEach(profile => profile.Status = "DONE"); - // // // await _context.SaveChangesAsync(); - // // // } - // } - #endregion - - // New: Linear Flow - var now = DateTime.Now; - data.ForEach(profile => + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; + data = resultData, }); - Console.WriteLine($"[ReceiveReportExcecute] Saving changes to database for {data.Count} profiles"); - await _context.SaveChangesAsync(); - Console.WriteLine($"[ReceiveReportExcecute] Process completed successfully at {DateTime.Now}"); - return Success(resultData); - } - catch (Exception ex) - { - Console.Error.WriteLine($"[ReceiveReportExcecute] Error occurred: {ex.Message}"); - Console.Error.WriteLine($"[ReceiveReportExcecute] Stack trace: {ex.StackTrace}"); - throw; + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } } + return Success(); } } } diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs index 2cc8536d..8b3b4a9c 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs @@ -1,6 +1,5 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Models.Placement; @@ -33,7 +32,6 @@ namespace BMA.EHR.Placement.Service.Controllers private readonly MinIOService _documentService; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; public PlacementRepatriationController(PlacementRepository repository, @@ -42,7 +40,6 @@ namespace BMA.EHR.Placement.Service.Controllers MinIOService documentService, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - UserProfileRepository userProfileRepository, PermissionRepository permiss) { _repository = repository; @@ -51,7 +48,6 @@ namespace BMA.EHR.Placement.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _configuration = configuration; - _userProfileRepository = userProfileRepository; _permission = permiss; } @@ -61,7 +57,6 @@ namespace BMA.EHR.Placement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -76,48 +71,17 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet()] public async Task> GetListByAdmin(string? status = "ALL") { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_TEMPDUTY2"); + var getPermission = await _permission.GetPermissionOrgAPIAsync("LIST", "SYS_TEMPDUTY2", UserId); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; + // string?[] rootId = jsonData?.result?.rootId ?? null; + // string?[] child1Id = jsonData?.result?.child1Id ?? null; + // string?[] child2Id = jsonData?.result?.child2Id ?? null; + // string?[] child3Id = jsonData?.result?.child3Id ?? null; + // string?[] child4Id = jsonData?.result?.child4Id ?? null; var placementRepatriations = await _context.PlacementRepatriations.AsQueryable() // .Where(x => rootId == null ? true : rootId.Contains(x.rootOldId)) // .Where(x => child1Id == null ? true : child1Id.Contains(x.child1OldId)) @@ -150,8 +114,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.child4ShortNameOld, p.PositionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.posMasterNoOld, p.posTypeOldId, p.posTypeNameOld, @@ -169,51 +131,10 @@ namespace BMA.EHR.Placement.Service.Controllers p.OrganizationPositionOld, p.IsActive, p.DateRepatriation, - p.rootDnaOldId, - p.child1DnaOldId, - p.child2DnaOldId, - p.child3DnaOldId, - p.child4DnaOldId, }) .ToListAsync(); if (status != null && status.Trim().ToUpper() != "ALL") placementRepatriations = placementRepatriations.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - placementRepatriations = placementRepatriations - .Where(x => node == 4 ? x.child4DnaOldId == nodeId : (node == 3 ? x.child3DnaOldId == nodeId : (node == 2 ? x.child2DnaOldId == nodeId : (node == 1 ? x.child1DnaOldId == nodeId : (node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - placementRepatriations = placementRepatriations - .Where(x => node == 4 ? x.child3DnaOldId == nodeId : (node == 3 ? x.child2DnaOldId == nodeId : (node == 2 ? x.child1DnaOldId == nodeId : (node == 1 || node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - placementRepatriations = placementRepatriations - .Where(x => x.rootDnaOldId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // placementRepatriations = placementRepatriations - // .Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList(); - // } - else if (role == "NORMAL") - { - placementRepatriations = placementRepatriations.Where(x => - node == 0 ? x.rootDnaOldId == nodeId && x.child1DnaOldId == null : - node == 1 ? x.child1DnaOldId == nodeId && x.child2DnaOldId == null : - node == 2 ? x.child2DnaOldId == nodeId && x.child3DnaOldId == null : - node == 3 ? x.child3DnaOldId == nodeId && x.child4DnaOldId == null : - node == 4 ? x.child4DnaOldId == nodeId : - true - ).ToList(); - } return Success(placementRepatriations); } @@ -280,8 +201,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.OrganizationPositionOld, p.PositionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.DateRepatriation, }) .FirstOrDefaultAsync(); @@ -327,7 +246,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -370,19 +289,15 @@ namespace BMA.EHR.Placement.Service.Controllers placementRepatriation.PositionOld = org.result.position; placementRepatriation.PositionExecutiveOld = org.result.posExecutiveName; - placementRepatriation.positionExecutiveFieldOld = org.result.positionExecutiveField; - placementRepatriation.positionAreaOld = org.result.positionArea; placementRepatriation.PositionLevelOld = org.result.posLevelName; placementRepatriation.PositionTypeOld = org.result.posTypeName; - placementRepatriation.PositionNumberOld = org.result.posNo; + placementRepatriation.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; placementRepatriation.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + (org.result.child1 == null ? "" : org.result.child1 + "\n") + (org.result.root == null ? "" : org.result.root); - placementRepatriation.OrganizationPositionOld = org.result.position + "\n" + - (placementRepatriation.PositionExecutiveOld == null ? "" : (placementRepatriation.positionExecutiveField == null ? placementRepatriation.PositionExecutiveOld + "\n" : placementRepatriation.PositionExecutiveOld + "(" + placementRepatriation.positionExecutiveField + ")" + "\n")) - + placementRepatriation.OrganizationOld; + placementRepatriation.OrganizationPositionOld = org.result.position + "\n" + (placementRepatriation.PositionExecutiveOld == null ? "" : placementRepatriation.PositionExecutiveOld + "\n") + placementRepatriation.OrganizationOld; } var baseAPIOrg = _configuration["API"]; @@ -390,7 +305,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = req.OfficerId ?? Guid.Parse("00000000-0000-0000-0000-000000000000"), @@ -497,7 +412,7 @@ namespace BMA.EHR.Placement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = deleted.refId ?? Guid.Parse("00000000-0000-0000-0000-000000000000"), @@ -623,7 +538,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementRepatriations .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -636,9 +550,7 @@ namespace BMA.EHR.Placement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutiveOld, - positionExecutiveField = p.positionExecutiveFieldOld, - positionArea = p.positionAreaOld, + positionExecutive = "", positionType = p.PositionTypeOld, positionLevel = p.PositionLevelOld, commandId = r.commandId, @@ -665,39 +577,25 @@ namespace BMA.EHR.Placement.Service.Controllers commandName = r.commandName, remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // // // var _result = await _res.Content.ReadAsStringAsync(); - // // // if (_res.IsSuccessStatusCode) - // // // { - // // // data.ForEach(profile => profile.Status = "DONE"); - // // // await _context.SaveChangesAsync(); - // // // } - // } - #endregion - // New: Linear Flow - Task #224ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } } } diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs index a165be68..d38ba020 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs @@ -15,7 +15,6 @@ using System.Net.Http.Headers; using System.Security.Claims; using Newtonsoft.Json.Linq; using BMA.EHR.Application.Repositories.Reports; -using BMA.EHR.Application.Responses.Profiles; namespace BMA.EHR.Placement.Service.Controllers { @@ -34,7 +33,6 @@ namespace BMA.EHR.Placement.Service.Controllers private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; private readonly PermissionRepository _permission; - private readonly UserProfileRepository _userProfileRepository; private readonly TransferReportRepository _service; public PlacementTransferController(PlacementRepository repository, @@ -44,7 +42,6 @@ namespace BMA.EHR.Placement.Service.Controllers IHttpContextAccessor httpContextAccessor, IConfiguration configuration, PermissionRepository permission, - UserProfileRepository userProfileRepository, TransferReportRepository service) { _repository = repository; @@ -54,7 +51,6 @@ namespace BMA.EHR.Placement.Service.Controllers _httpContextAccessor = httpContextAccessor; _configuration = configuration; _permission = permission; - _userProfileRepository = userProfileRepository; _service = service; } @@ -64,7 +60,6 @@ namespace BMA.EHR.Placement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -79,12 +74,11 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet("user")] public async Task> GetListByProfile() { - // var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; - var apiUrl = $"{_configuration["API"]}/org/dotnet/get-profileId"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -169,49 +163,24 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet()] public async Task> GetListByAdmin(string? status = "ALL") { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_TRANSFER_REQ"); + var getPermission = await _permission.GetPermissionOrgAPIAsync("LIST", "SYS_TRANSFER_REQ", UserId); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; + // var data = JsonConvert.DeserializeObject(getPermission); + // string?[]? root = data?.Result?.Root ?? null; + // string?[]? child1 = data?.Result?.Child1 ?? null; + // string?[]? child2 = data?.Result?.Child2 ?? null; + // string?[]? child3 = data?.Result?.Child3 ?? null; + // string?[]? child4 = data?.Result?.Child4 ?? null; var placementTransfers = await _context.PlacementTransfers.AsQueryable() + // .Where(x => root == null ? true : root.Contains(x.rootOldId)) + // .Where(x => child1 == null ? true : child1.Contains(x.child1OldId)) + // .Where(x => child2 == null ? true : child2.Contains(x.child2OldId)) + // .Where(x => child3 == null ? true : child3.Contains(x.child3OldId)) + // .Where(x => child4 == null ? true : child4.Contains(x.child4OldId)) .OrderByDescending(x => x.CreatedAt) .Select(p => new { @@ -238,8 +207,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.child4ShortNameOld, p.PositionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, p.posMasterNoOld, p.posTypeOldId, p.posTypeNameOld, @@ -256,52 +223,10 @@ namespace BMA.EHR.Placement.Service.Controllers p.PositionNumberOld, p.OrganizationPositionOld, p.IsActive, - p.rootDnaOldId, - p.child1DnaOldId, - p.child2DnaOldId, - p.child3DnaOldId, - p.child4DnaOldId, }) .ToListAsync(); if (status != null && status.Trim().ToUpper() != "ALL") placementTransfers = placementTransfers.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - placementTransfers = placementTransfers - .Where(x => node == 4 ? x.child4DnaOldId == nodeId : (node == 3 ? x.child3DnaOldId == nodeId : (node == 2 ? x.child2DnaOldId == nodeId : (node == 1 ? x.child1DnaOldId == nodeId : (node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - placementTransfers = placementTransfers - .Where(x => node == 4 ? x.child3DnaOldId == nodeId : (node == 3 ? x.child2DnaOldId == nodeId : (node == 2 ? x.child1DnaOldId == nodeId : (node == 1 || node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - placementTransfers = placementTransfers - .Where(x => x.rootDnaOldId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // placementTransfers = placementTransfers - // .Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList(); - // } - else if (role == "NORMAL") - { - placementTransfers = placementTransfers.Where(x => - node == 0 ? x.rootDnaOldId == nodeId && x.child1DnaOldId == null : - node == 1 ? x.child1DnaOldId == nodeId && x.child2DnaOldId == null : - node == 2 ? x.child2DnaOldId == nodeId && x.child3DnaOldId == null : - node == 3 ? x.child3DnaOldId == nodeId && x.child4DnaOldId == null : - node == 4 ? x.child4DnaOldId == nodeId : - true - ).ToList(); - } - return Success(placementTransfers); } @@ -358,8 +283,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.OrganizationPositionOld, p.PositionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, PlacementTransferDocs = p.PlacementTransferDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), }) .FirstOrDefaultAsync(); @@ -415,8 +338,6 @@ namespace BMA.EHR.Placement.Service.Controllers data.OrganizationPositionOld, data.PositionOld, data.PositionExecutiveOld, - data.positionExecutiveFieldOld, - data.positionAreaOld, Docs = placementTransferDocs, }; @@ -486,8 +407,6 @@ namespace BMA.EHR.Placement.Service.Controllers p.OrganizationPositionOld, p.PositionOld, p.PositionExecutiveOld, - p.positionExecutiveFieldOld, - p.positionAreaOld, PlacementTransferDocs = p.PlacementTransferDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), }) .FirstOrDefaultAsync(); @@ -543,8 +462,6 @@ namespace BMA.EHR.Placement.Service.Controllers data.OrganizationPositionOld, data.PositionOld, data.PositionExecutiveOld, - data.positionExecutiveFieldOld, - data.positionAreaOld, Docs = placementTransferDocs, }; @@ -575,11 +492,10 @@ namespace BMA.EHR.Placement.Service.Controllers LastUpdatedAt = DateTime.Now, }; var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; - bool isDeputy = false; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -589,8 +505,6 @@ namespace BMA.EHR.Placement.Service.Controllers if (org == null || org.result == null) return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); - isDeputy = org.result.isDeputy.HasValue ? org.result.isDeputy.Value : false; - placementTransfer.profileId = org.result.profileId; placementTransfer.prefix = org.result.prefix; placementTransfer.firstName = org.result.firstName; @@ -624,19 +538,15 @@ namespace BMA.EHR.Placement.Service.Controllers placementTransfer.AmountOld = org.result.salary; placementTransfer.PositionOld = org.result.position; placementTransfer.PositionExecutiveOld = org.result.posExecutiveName; - placementTransfer.positionExecutiveFieldOld = org.result.positionExecutiveField; - placementTransfer.positionAreaOld = org.result.positionArea; placementTransfer.PositionLevelOld = org.result.posLevelName; placementTransfer.PositionTypeOld = org.result.posTypeName; - placementTransfer.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; + placementTransfer.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; placementTransfer.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + (org.result.child1 == null ? "" : org.result.child1 + "\n") + (org.result.root == null ? "" : org.result.root); - placementTransfer.OrganizationPositionOld = org.result.position + "\n" + - (placementTransfer.PositionExecutiveOld == null ? "" : (placementTransfer.positionExecutiveField == null ? placementTransfer.PositionExecutiveOld + "\n" : placementTransfer.PositionExecutiveOld + "(" + placementTransfer.positionExecutiveField + ")" + "\n")) - + placementTransfer.OrganizationOld; + placementTransfer.OrganizationPositionOld = org.result.position + "\n" + (placementTransfer.PositionExecutiveOld == null ? "" : placementTransfer.PositionExecutiveOld + "\n") + placementTransfer.OrganizationOld; } await _context.PlacementTransfers.AddAsync(placementTransfer); await _context.SaveChangesAsync(); @@ -667,21 +577,18 @@ namespace BMA.EHR.Placement.Service.Controllers } } } - var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/workflow/add-workflow"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = placementTransfer.Id, sysName = "SYS_TRANSFER_REQ", posLevelName = placementTransfer.posLevelNameOld, posTypeName = placementTransfer.posTypeNameOld, - fullName = $"{placementTransfer.prefix}{placementTransfer.firstName} {placementTransfer.lastName}", - isDeputy = isDeputy }); } await _context.SaveChangesAsync(); @@ -689,141 +596,6 @@ namespace BMA.EHR.Placement.Service.Controllers return Success(placementTransfer.Id); } - /// - /// สร้างคำขอโอน โดย admin - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("admin")] - public async Task> PostAdmin([FromForm] PlacementTransferAdminRequest req) - { - var placementTransfer = new PlacementTransfer - { - Organization = req.Organization, - Reason = req.Reason, - Status = "APPROVE", - Date = req.Date, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }; - var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.ProfileId}"; - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); - var _res = await client.SendAsync(_req); - var _result = await _res.Content.ReadAsStringAsync(); - - var org = JsonConvert.DeserializeObject(_result); - - if (org == null || org.result == null) - return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); - - placementTransfer.profileId = org.result.profileId; - placementTransfer.prefix = org.result.prefix; - placementTransfer.firstName = org.result.firstName; - placementTransfer.lastName = org.result.lastName; - placementTransfer.citizenId = org.result.citizenId; - placementTransfer.rootOld = org.result.root; - placementTransfer.rootOldId = org.result.rootId; - placementTransfer.rootDnaOldId = org.result.rootDnaId; - placementTransfer.rootShortNameOld = org.result.rootShortName; - placementTransfer.child1Old = org.result.child1; - placementTransfer.child1OldId = org.result.child1Id; - placementTransfer.child1DnaOldId = org.result.child1DnaId; - placementTransfer.child1ShortNameOld = org.result.child1ShortName; - placementTransfer.child2Old = org.result.child2; - placementTransfer.child2OldId = org.result.child2Id; - placementTransfer.child2DnaOldId = org.result.child2DnaId; - placementTransfer.child2ShortNameOld = org.result.child2ShortName; - placementTransfer.child3Old = org.result.child3; - placementTransfer.child3OldId = org.result.child3Id; - placementTransfer.child3DnaOldId = org.result.child3DnaId; - placementTransfer.child3ShortNameOld = org.result.child3ShortName; - placementTransfer.child4Old = org.result.child4; - placementTransfer.child4OldId = org.result.child4Id; - placementTransfer.child4DnaOldId = org.result.child4DnaId; - placementTransfer.child4ShortNameOld = org.result.child4ShortName; - placementTransfer.posMasterNoOld = org.result.posMasterNo; - placementTransfer.posTypeOldId = org.result.posTypeId; - placementTransfer.posTypeNameOld = org.result.posTypeName; - placementTransfer.posLevelOldId = org.result.posLevelId; - placementTransfer.posLevelNameOld = org.result.posLevelName; - placementTransfer.AmountOld = org.result.salary; - placementTransfer.PositionOld = org.result.position; - placementTransfer.PositionExecutiveOld = org.result.posExecutiveName; - placementTransfer.positionExecutiveFieldOld = org.result.positionExecutiveField; - placementTransfer.positionAreaOld = org.result.positionArea; - placementTransfer.PositionLevelOld = org.result.posLevelName; - placementTransfer.PositionTypeOld = org.result.posTypeName; - placementTransfer.PositionNumberOld = org.result.posNo; - placementTransfer.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + - (org.result.child3 == null ? "" : org.result.child3 + "\n") + - (org.result.child2 == null ? "" : org.result.child2 + "\n") + - (org.result.child1 == null ? "" : org.result.child1 + "\n") + - (org.result.root == null ? "" : org.result.root); - placementTransfer.OrganizationPositionOld = org.result.position + "\n" + - (placementTransfer.PositionExecutiveOld == null ? "" : (placementTransfer.positionExecutiveField == null ? placementTransfer.PositionExecutiveOld + "\n" : placementTransfer.PositionExecutiveOld + "(" + placementTransfer.positionExecutiveField + ")" + "\n")) - + placementTransfer.OrganizationOld; - } - await _context.PlacementTransfers.AddAsync(placementTransfer); - await _context.SaveChangesAsync(); - if (Request.Form.Files != null && Request.Form.Files.Count != 0) - { - foreach (var file in Request.Form.Files) - { - var fileExtension = Path.GetExtension(file.FileName); - - var doc = await _documentService.UploadFileAsync(file, file.FileName); - var _doc = await _context.Documents.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == doc.Id); - if (_doc != null) - { - var placementTransferDoc = new PlacementTransferDoc - { - PlacementTransfer = placementTransfer, - Document = _doc, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }; - await _context.PlacementTransferDocs.AddAsync(placementTransferDoc); - - } - } - } - - //var baseAPIOrg = _configuration["API"]; - //var apiUrlOrg = $"{baseAPIOrg}/org/workflow/add-workflow"; - //using (var client = new HttpClient()) - //{ - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // refId = placementTransfer.Id, - // sysName = "SYS_TRANSFER_REQ", - // posLevelName = placementTransfer.posLevelNameOld, - // posTypeName = placementTransfer.posTypeNameOld, - // fullName = $"{placementTransfer.prefix}{placementTransfer.firstName} {placementTransfer.lastName}" - // }); - //} - await _context.SaveChangesAsync(); - - return Success(placementTransfer.Id); - } - /// /// แก้ไขคำขอโอน /// @@ -932,60 +704,6 @@ namespace BMA.EHR.Placement.Service.Controllers return Success(); } - /// - /// API ลบรายการคำขอโอน (ADMIN) - /// - /// Id คำขอโอน - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/{id:length(36)}")] - public async Task> DeleteForAdminAsync(Guid id) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("DELETE", "SYS_TRANSFER_REQ"); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - // ตรวจสอบว่า role ต้องเป็น OWNER เท่านั้น - if (jsonData.result.privilege != "OWNER") - { - return Error("ไม่มีสิทธิ์ในการลบรายการคำขอโอน", StatusCodes.Status403Forbidden); - } - var deleted = await _context.PlacementTransfers.AsQueryable() - .Include(x => x.PlacementTransferDocs) - .ThenInclude(x => x.Document) - .FirstOrDefaultAsync(x => x.Id == id); - if (deleted == null) - return NotFound(); - - // ห้ามลบเฉพาะสถานะ REPORT, WAITING, DONE - if (new[] { "REPORT", "WAITING", "DONE" }.Contains(deleted.Status)) - { - return Error("ไม่สามารถลบรายการคำขอโอนสถานะนี้ได้"); - } - - var placementTransferDocs = new List(); - foreach (var doc in deleted.PlacementTransferDocs) - { - if (doc.Document != null) - placementTransferDocs.Add(doc.Document.Id); - } - _context.PlacementTransferDocs.RemoveRange(deleted.PlacementTransferDocs); - await _context.SaveChangesAsync(); - _context.PlacementTransfers.Remove(deleted); - foreach (var doc in placementTransferDocs) - { - if (doc != null) - await _documentService.DeleteFileAsync(doc); - } - await _context.SaveChangesAsync(); - - return Success(); - } - /// /// สั่งรายชื่อไปออกคำสั่ง /// @@ -1096,8 +814,8 @@ namespace BMA.EHR.Placement.Service.Controllers ActiveDate = p.Date == null ? "-" : p.Date.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), Reason = p.Reason ?? "-", - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -1148,7 +866,6 @@ namespace BMA.EHR.Placement.Service.Controllers var data = await _context.PlacementTransfers .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - var resultData = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId @@ -1159,14 +876,11 @@ namespace BMA.EHR.Placement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutiveOld, - positionExecutiveField = p.positionExecutiveFieldOld, - positionArea = p.positionAreaOld, + positionExecutive = "", positionType = p.PositionTypeOld, positionLevel = p.PositionLevelOld, commandId = r.commandId, - //leaveReason = "โอนออก", - leaveReason = string.IsNullOrWhiteSpace(p.Reason) ? "โอนออก" : p.Reason, + leaveReason = "โอนออก", dateLeave = r.commandDateAffect, isLeave = true, orgRoot = p.rootOld, @@ -1191,38 +905,24 @@ namespace BMA.EHR.Placement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // // // var _result = await _res.Content.ReadAsStringAsync(); - // // // if (_res.IsSuccessStatusCode) - // // // { - // // // data.ForEach(profile => profile.Status = "DONE"); - // // // await _context.SaveChangesAsync(); - // // // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } diff --git a/BMA.EHR.Placement.Service/Program.cs b/BMA.EHR.Placement.Service/Program.cs index bd4eb6e8..6ba63a4e 100644 --- a/BMA.EHR.Placement.Service/Program.cs +++ b/BMA.EHR.Placement.Service/Program.cs @@ -21,7 +21,6 @@ using System.Text; using System.Transactions; using BMA.EHR.Placement.Service.Filters; using BMA.EHR.Application.Repositories.Reports; -using BMA.EHR.Application.Repositories; var builder = WebApplication.CreateBuilder(args); { @@ -148,14 +147,13 @@ var app = builder.Build(); app.UseHttpsRedirection(); app.UseCors(); - app.UseMiddleware(); app.UseAuthentication(); app.UseAuthorization(); app.UseDefaultFiles(); app.UseStaticFiles(); app.MapControllers(); - // app.UseMiddleware(); - // app.UseMiddleware(); + app.UseMiddleware(); + app.UseMiddleware(); app.UseHangfireDashboard("/hangfire", new DashboardOptions() { @@ -165,8 +163,6 @@ var app = builder.Build(); if (manager != null) { manager.AddOrUpdate("แจ้งเตือนระบบทดลองงาน", Job.FromExpression(x => x.NotifyProbation()), Cron.Daily(Int32.Parse(builder.Configuration["KeycloakCron:Hour"]), Int32.Parse(builder.Configuration["KeycloakCron:Minute"])), TimeZoneInfo.Local); - // Job: อัพเดทสถานะผู้สอบผ่านที่ลาออกไปแล้วแต่ยังไม่ส่งไปออกคำสั่ง ทำงานทุกวันเวลา 05:00 น. - manager.AddOrUpdate("ประมวลผลข้าราชการฯ กทม.", Job.FromExpression(x => x.UpdateStatusPlacementProfiles()), Cron.Daily(5), TimeZoneInfo.Local); } // apply migrations diff --git a/BMA.EHR.Placement.Service/Requests/OrgRequest.cs b/BMA.EHR.Placement.Service/Requests/OrgRequest.cs index 6fd3c148..71dbcc81 100644 --- a/BMA.EHR.Placement.Service/Requests/OrgRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/OrgRequest.cs @@ -42,8 +42,6 @@ namespace BMA.EHR.Placement.Service.Requests public int? posMasterNo { get; set; } public string? position { get; set; } public string? posExecutiveName { get; set; } - public string? positionExecutiveField { get; set; } - public string? positionArea { get; set; } public string? posTypeId { get; set; } public string? posTypeName { get; set; } public string? posLevelId { get; set; } @@ -51,9 +49,6 @@ namespace BMA.EHR.Placement.Service.Requests public double? salary { get; set; } public string? education { get; set; } public double? Amount { get; set; } - public string? avatarUrl { get; set; } - public bool? isDeputy { get; set; } - public string? posNo { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Placement.Service/Requests/OrgRequestAct.cs b/BMA.EHR.Placement.Service/Requests/OrgRequestAct.cs index 6189eaf4..dace91d3 100644 --- a/BMA.EHR.Placement.Service/Requests/OrgRequestAct.cs +++ b/BMA.EHR.Placement.Service/Requests/OrgRequestAct.cs @@ -15,6 +15,5 @@ namespace BMA.EHR.Placement.Service.Requests public string? child2Id { get; set; } public string? child3Id { get; set; } public string? child4Id { get; set; } - public string? rootDnaId { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Placement.Service/Requests/PersonEducationRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonEducationRequest.cs index 31ac48ab..380111d5 100644 --- a/BMA.EHR.Placement.Service/Requests/PersonEducationRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PersonEducationRequest.cs @@ -23,7 +23,6 @@ namespace BMA.EHR.Placement.Service.Requests public DateTime? FinishDate { get; set; } public DateTime? StartDate { get; set; } public DateTime? EndDate { get; set; } - public string? EducationLevelName { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs index e64444ed..c3b084bc 100644 --- a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionAppointmentRequest.cs @@ -30,8 +30,5 @@ namespace BMA.EHR.Placement.Service.Requests public string? posLevelName { get; set; } public string? typeCommand { get; set; } public string? posExecutiveName { get; set; } - public string? posExecutiveId { get; set; } - public string? positionExecutiveField { get; set; } - public string? positionArea { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs index 29e5d096..340647cf 100644 --- a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionReceiveRequest.cs @@ -30,8 +30,5 @@ namespace BMA.EHR.Placement.Service.Requests public string? posLevelName { get; set; } public string? typeCommand { get; set; } public string? posExecutiveName { get; set; } - public string? posExecutiveId { get; set; } - public string? positionExecutiveField { get; set; } - public string? positionArea { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionRequest.cs index 681bc1d5..511cd196 100644 --- a/BMA.EHR.Placement.Service/Requests/PersonSelectPositionRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PersonSelectPositionRequest.cs @@ -39,9 +39,5 @@ namespace BMA.EHR.Placement.Service.Requests public string? posLevelName { get; set; } public string? typeCommand { get; set; } public string? posExecutiveName { get; set; } - public string? posExecutiveId { get; set; } - public string? positionExecutiveField { get; set; } - public string? positionArea { get; set; } - } } \ No newline at end of file diff --git a/BMA.EHR.Placement.Service/Requests/PersonUpdateStatusRequest.cs b/BMA.EHR.Placement.Service/Requests/PersonUpdateStatusRequest.cs deleted file mode 100644 index aef70fb5..00000000 --- a/BMA.EHR.Placement.Service/Requests/PersonUpdateStatusRequest.cs +++ /dev/null @@ -1,10 +0,0 @@ -using BMA.EHR.Domain.Models.MetaData; -using Microsoft.EntityFrameworkCore; - -namespace BMA.EHR.Placement.Service.Requests -{ - public class PersonUpdateStatusRequest - { - public Guid PersonalId { get; set; } - } -} diff --git a/BMA.EHR.Placement.Service/Requests/PlacementReceiveEditRequest.cs b/BMA.EHR.Placement.Service/Requests/PlacementReceiveEditRequest.cs index cafc0ad9..7c1cb172 100644 --- a/BMA.EHR.Placement.Service/Requests/PlacementReceiveEditRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PlacementReceiveEditRequest.cs @@ -6,8 +6,7 @@ namespace BMA.EHR.Placement.Service.Requests public class PlacementReceiveEditRequest { public string citizenId { get; set; } - public string? prefix { get; set; } - public string? rank { get; set; } + public string prefix { get; set; } public string firstName { get; set; } public string lastName { get; set; } public DateTime DateOfBirth { get; set; } diff --git a/BMA.EHR.Placement.Service/Requests/PlacementReceiveRequest.cs b/BMA.EHR.Placement.Service/Requests/PlacementReceiveRequest.cs index 49563324..b546c1f3 100644 --- a/BMA.EHR.Placement.Service/Requests/PlacementReceiveRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PlacementReceiveRequest.cs @@ -6,9 +6,7 @@ namespace BMA.EHR.Placement.Service.Requests public class PlacementReceiveRequest { public string citizenId { get; set; } - - public string? prefix { get; set; } - public string? rank { get; set; } + public string prefix { get; set; } public string firstName { get; set; } public string lastName { get; set; } public DateTime BirthDate { get; set; } diff --git a/BMA.EHR.Placement.Service/Requests/PlacementTransferRequest.cs b/BMA.EHR.Placement.Service/Requests/PlacementTransferRequest.cs index 6611f92c..7f740043 100644 --- a/BMA.EHR.Placement.Service/Requests/PlacementTransferRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/PlacementTransferRequest.cs @@ -10,13 +10,4 @@ namespace BMA.EHR.Placement.Service.Requests public DateTime? Date { get; set; } public List? File { get; set; } } - - public class PlacementTransferAdminRequest - { - public string ProfileId { get; set; } - public string Organization { get; set; } - public string Reason { get; set; } - public DateTime? Date { get; set; } - public List? File { get; set; } - } } diff --git a/BMA.EHR.Placement.Service/Requests/ReportPersonRequest.cs b/BMA.EHR.Placement.Service/Requests/ReportPersonRequest.cs index a7e311b0..c345f6bf 100644 --- a/BMA.EHR.Placement.Service/Requests/ReportPersonRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/ReportPersonRequest.cs @@ -6,6 +6,6 @@ namespace BMA.EHR.Placement.Service.Requests public class ReportPersonRequest { public string[] refIds { get; set; } - public string? status { get; set; } + public string status { get; set; } } } diff --git a/BMA.EHR.Placement.Service/appsettings.json b/BMA.EHR.Placement.Service/appsettings.json index 6213c84c..f40436b3 100644 --- a/BMA.EHR.Placement.Service/appsettings.json +++ b/BMA.EHR.Placement.Service/appsettings.json @@ -15,14 +15,11 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "LeaveConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_leave;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - "MongoConnection": "mongodb://admin:adminVM123@192.168.1.80:27017", - "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - "RecruitConnection": "server=192.168.1.80;user=root;password=adminVM123;database=hrms_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - "ExamConnection": "server=192.168.1.80;user=root;password=adminVM123;database=hrms_exam;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + //"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB", + "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" }, "Jwt": { - "Key": "Hp3234M8rH1KjIdvhlUStayo6vIUOIeI76NKyIsiXJ8", + "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", "Issuer": "https://id.frappet.synology.me/realms/hrms" }, "EPPlus": { diff --git a/BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj b/BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj index bd9c567c..8308a1be 100644 --- a/BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj +++ b/BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj @@ -9,23 +9,20 @@ True . BMA.EHR.Report.Service - false - $(NoWarn);$(WarningsNotAsErrors) - - + - + - + - + @@ -52,15 +49,15 @@ - + - + - + - - Never - + + Never + @@ -160,10 +157,10 @@ PreserveNewest - + PreserveNewest - + PreserveNewest @@ -203,22 +200,22 @@ PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest PreserveNewest @@ -251,22 +248,22 @@ PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest PreserveNewest @@ -305,19 +302,19 @@ PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest - PreserveNewest + PreserveNewest PreserveNewest @@ -329,7 +326,7 @@ PreserveNewest - PreserveNewest + PreserveNewest PreserveNewest diff --git a/BMA.EHR.Report.Service/Controllers/RetireReportController.cs b/BMA.EHR.Report.Service/Controllers/RetireReportController.cs index daa4bac6..c5c2fa1a 100644 --- a/BMA.EHR.Report.Service/Controllers/RetireReportController.cs +++ b/BMA.EHR.Report.Service/Controllers/RetireReportController.cs @@ -23,17 +23,13 @@ namespace BMA.EHR.Report.Service.Controllers private readonly IConfiguration _configuration; private readonly PermissionRepository _permission; - private readonly IHttpContextAccessor _httpContextAccessor; - - public RetireReportController(RetireReportRepository service, IWebHostEnvironment hostingEnvironment, IConfiguration configuration, PermissionRepository permission, IHttpContextAccessor httpContextAccessor) + public RetireReportController(RetireReportRepository service, IWebHostEnvironment hostingEnvironment, IConfiguration configuration, PermissionRepository permission) { _service = service; _hostingEnvironment = hostingEnvironment; _configuration = configuration; _permission = permission; - _httpContextAccessor = httpContextAccessor; } - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #region 31-ประกาศเกษียณข้าราชการ & 32-ประกาศเกษียณลูกจ้างประจำ /// @@ -48,7 +44,7 @@ namespace BMA.EHR.Report.Service.Controllers [HttpGet("{exportType}/{Id}")] public async Task> GetProfileRetirement([FromRoute] Guid Id, string exportType = "pdf") { - var retire = await _service.GetProfileRetirementdAsync(Id,AccessToken); + var retire = await _service.GetProfileRetirementdAsync(Id,token); if (retire != null) { var reportfile = string.Empty; diff --git a/BMA.EHR.Report.Service/Program.cs b/BMA.EHR.Report.Service/Program.cs index b9066822..319db2e4 100644 --- a/BMA.EHR.Report.Service/Program.cs +++ b/BMA.EHR.Report.Service/Program.cs @@ -123,13 +123,12 @@ var app = builder.Build(); app.UseHttpsRedirection(); app.UseCors(); - app.UseMiddleware(); app.UseAuthentication(); app.UseAuthorization(); app.UseDefaultFiles(); app.UseStaticFiles(); app.MapControllers(); - //app.UseMiddleware(); + app.UseMiddleware(); // apply migrations await using var scope = app.Services.CreateAsyncScope(); diff --git a/BMA.EHR.Retirement.Service/BMA.EHR.Retirement.Service.csproj b/BMA.EHR.Retirement.Service/BMA.EHR.Retirement.Service.csproj index 6a820e15..8c1fd03f 100644 --- a/BMA.EHR.Retirement.Service/BMA.EHR.Retirement.Service.csproj +++ b/BMA.EHR.Retirement.Service/BMA.EHR.Retirement.Service.csproj @@ -1,20 +1,17 @@ - - net7.0 - enable - enable - 7be0011e-a539-4e0e-a300-ed7f11163989 - Linux - True - . - BMA.EHR.Retirement.Service - false - $(NoWarn);$(WarningsNotAsErrors) + + net7.0 + enable + enable + 7be0011e-a539-4e0e-a300-ed7f11163989 + Linux + True + . + BMA.EHR.Retirement.Service + - - - + @@ -40,17 +37,10 @@ - - + - - - - - - - PreserveNewest - - + + + diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs index b7a8b8df..07036a35 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs @@ -7,7 +7,6 @@ using BMA.EHR.Domain.Models.Retirement; using BMA.EHR.Domain.Shared; using BMA.EHR.Infrastructure.Persistence; using BMA.EHR.Retirement.Service.Requests; -using BMA.EHR.Retirement.Service.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; @@ -38,7 +37,6 @@ namespace BMA.EHR.Retirement.Service.Controllers private readonly PermissionRepository _permission; private readonly DisciplineDbContext _contextDiscipline; private readonly RetireReportRepository _service; - private readonly RetirementReportService _reportService; public RetirementController(RetirementRepository repository, NotificationRepository repositoryNoti, ApplicationDBContext context, @@ -48,8 +46,7 @@ namespace BMA.EHR.Retirement.Service.Controllers IHttpContextAccessor httpContextAccessor, PermissionRepository permission, DisciplineDbContext contextDiscipline, - RetireReportRepository service, - RetirementReportService reportService) + RetireReportRepository service) { _repository = repository; _repositoryNoti = repositoryNoti; @@ -61,7 +58,6 @@ namespace BMA.EHR.Retirement.Service.Controllers _permission = permission; _contextDiscipline = contextDiscipline; _service = service; - _reportService = reportService; } #region " Properties " @@ -275,7 +271,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -292,7 +288,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -316,7 +312,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -335,15 +331,13 @@ namespace BMA.EHR.Retirement.Service.Controllers } } var order = 1; - foreach (var profile in profiles - .OrderBy(x => string.IsNullOrEmpty(x.root) ? int.MaxValue : rootOrder.ToObject>().IndexOf(x.root)) + foreach (var profile in profiles.OrderBy(x => rootOrder.ToObject>().IndexOf(x.root)) .ThenBy(x => child1Order.ToObject>().IndexOf(x.child1 ?? "")) .ThenBy(x => child2Order.ToObject>().IndexOf(x.child2 ?? "")) .ThenBy(x => child3Order.ToObject>().IndexOf(x.child3 ?? "")) .ThenBy(x => child4Order.ToObject>().IndexOf(x.child4 ?? "")) .ThenBy(x => posTypeNameOrder.ToObject>().IndexOf(x.posTypeName ?? "")) - .ThenBy(x => posLevelNameOrder.ToObject>().IndexOf(x.posLevelName ?? "")) - .ThenBy(x => x.posNo)) + .ThenBy(x => posLevelNameOrder.ToObject>().IndexOf(x.posLevelName ?? ""))) { var data = new RetirementProfile { @@ -380,8 +374,6 @@ namespace BMA.EHR.Retirement.Service.Controllers posLevelRank = profile.posLevelRank, posExecutiveId = profile.posExecutiveId, posExecutiveName = profile.posExecutiveName, - positionExecutiveField = profile.positionExecutiveField, - positionArea = profile.positionArea, posNo = profile.posNo, CreatedFullName = FullName ?? "System Administrator", CreatedUserId = UserId ?? "", @@ -425,8 +417,6 @@ namespace BMA.EHR.Retirement.Service.Controllers posLevelRank = profile.posLevelRank, posExecutiveId = profile.posExecutiveId, posExecutiveName = profile.posExecutiveName, - positionExecutiveField = profile.positionExecutiveField, - positionArea = profile.positionArea, posNo = profile.posNo, CreatedFullName = FullName ?? "System Administrator", CreatedUserId = UserId ?? "", @@ -448,10 +438,10 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error(GlobalMessages.RetirementNotCreated); if (req.Option == null) req.Option = "EDIT"; - + var profile_old = await _context.RetirementProfiles .Where(x => x.RetirementPeriod == retire) - .Select(x => new + .Select((x,index) => new { order = x.Order, id = x.Id, @@ -487,11 +477,8 @@ namespace BMA.EHR.Retirement.Service.Controllers posLevelRank = x.posLevelRank, posExecutiveId = x.posExecutiveId, posExecutiveName = x.posExecutiveName, - positionExecutiveField = x.positionExecutiveField, - positionArea = x.positionArea, posNo = x.posNo, }) - .OrderBy(x => x.order) .ToListAsync(); var file_name = $"retire_tmp_{DateTime.Now.ToString("yyyyMMddTHHmmss")}"; var profile = Newtonsoft.Json.JsonConvert.SerializeObject(profile_old); @@ -585,8 +572,6 @@ namespace BMA.EHR.Retirement.Service.Controllers posLevelRank = profileOld.posLevelRank, posExecutiveId = profileOld.posExecutiveId, posExecutiveName = profileOld.posExecutiveName, - positionExecutiveField = profileOld.positionExecutiveField, - positionArea = profileOld.positionArea, posNo = profileOld.posNo, CreatedFullName = FullName ?? "System Administrator", CreatedUserId = UserId ?? "", @@ -608,7 +593,6 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error(GlobalMessages.RetirementNotFound, 404); var profileOlds = await _context.RetirementProfiles.AsQueryable() .Where(x => x.RetirementPeriod == retireOld) - .OrderBy(x => x.Order) .ToListAsync(); if (profileOlds != null) { @@ -650,8 +634,6 @@ namespace BMA.EHR.Retirement.Service.Controllers posLevelRank = profileOld.posLevelRank, posExecutiveId = profileOld.posExecutiveId, posExecutiveName = profileOld.posExecutiveName, - positionExecutiveField = profileOld.positionExecutiveField, - positionArea = profileOld.positionArea, posNo = profileOld.posNo, CreatedFullName = FullName ?? "System Administrator", CreatedUserId = UserId ?? "", @@ -697,11 +679,8 @@ namespace BMA.EHR.Retirement.Service.Controllers positionType = x.posTypeName, positionLevel = x.posLevelName, positionExecutive = x.posExecutiveName, - positionExecutiveField = x.positionExecutiveField, - positionArea = x.positionArea, posNo = x.posNo, }) - .OrderBy(x => x.order) .ToListAsync(); // var profile_news = new List(); // foreach (var r in profile_new) @@ -810,15 +789,12 @@ namespace BMA.EHR.Retirement.Service.Controllers posTypeName = x.posTypeName, posLevelName = x.posLevelName, posExecutiveName = x.posExecutiveName, - positionExecutiveField = x.positionExecutiveField, - positionArea = x.positionArea, posNo = x.posNo, // positionEmployeePosition = x.Profile.PositionEmployeePosition == null ? null : x.Profile.PositionEmployeePosition.Name, // positionEmployeeLevel = x.Profile.PositionEmployeeLevel == null ? null : x.Profile.PositionEmployeeLevel.Name, // positionEmployeeGroup = x.Profile.PositionEmployeeGroup == null ? null : x.Profile.PositionEmployeeGroup.Name, // posNoEmployee = x.Profile.PosNoEmployee, }) - .OrderBy(x => x.order) .ToListAsync(); // var profile_news = new List(); // foreach (var r in profile_new) @@ -899,27 +875,35 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } + // var profile = await _context.Profiles + // .FirstOrDefaultAsync(x => x.Id == req.ProfileId); + // if (profile == null) + // return Error(GlobalMessages.DataNotFound, 404); + var retire = await _context.RetirementPeriods + .Include(x => x.RetirementPeriodHistorys) + .Include(x => x.RetirementProfiles) + // .ThenInclude(x => x.Profile) .FirstOrDefaultAsync(x => x.Id == retireId); if (retire == null) return Error(GlobalMessages.RetirementNotFound, 404); - - var retireProfile = await _context.RetirementProfiles - .FirstOrDefaultAsync(x => x.profileId == req.ProfileId && x.RetirementPeriod.Id == retireId); - if (retireProfile != null) + if (retire.RetirementProfiles.Where(x => x.profileId == req.ProfileId).Count() > 0) return Error("บุคคลนี้ได้ทำการเลือกไว้อยู่แล้ว"); - var numRaw = 0; - - if (retire.TypeReport != null) + foreach (var retire_profile in retire.RetirementProfiles) { - numRaw = 1; - var profileRawCount = await _context.RetirementRawProfiles - .Where(x => x.RetirementPeriod.Id == retireId) - .OrderByDescending(x => x.Order) - .FirstOrDefaultAsync(); - if (profileRawCount != null) - numRaw = profileRawCount.Order + 1; + retire_profile.Order++; + retire_profile.LastUpdateFullName = FullName ?? "System Administrator"; + retire_profile.LastUpdateUserId = UserId ?? ""; + retire_profile.LastUpdatedAt = DateTime.Now; } + var num = 0; + + var profileRawCount = await _context.RetirementRawProfiles + .CountAsync(x => x.RetirementPeriod.Id == retireId); + + // var old_retire = retire.RetirementProfiles.OrderByDescending(x => x.Order).FirstOrDefault(); + // if (old_retire != null) + // num = old_retire.Order + 1; if (retire.Type == "OFFICER") { @@ -928,7 +912,7 @@ namespace BMA.EHR.Retirement.Service.Controllers { var data = new RetirementProfile { - Order = numRaw, + Order = num, Remove = "ADD", RetirementPeriod = retire, CreatedFullName = FullName ?? "System Administrator", @@ -940,7 +924,7 @@ namespace BMA.EHR.Retirement.Service.Controllers }; var dataRaw = new RetirementRawProfile { - Order = numRaw, + Order = profileRawCount + 1, Remove = "ADD", RetirementPeriod = retire, CreatedFullName = FullName ?? "System Administrator", @@ -990,8 +974,6 @@ namespace BMA.EHR.Retirement.Service.Controllers data.posLevelRank = org.result.posLevelRank; data.posExecutiveId = org.result.posExecutiveId; data.posExecutiveName = org.result.posExecutiveName; - data.positionExecutiveField = org.result.positionExecutiveField; - data.positionArea = org.result.positionArea; data.posNo = org.result.posNo; dataRaw.profileId = org.result.profileId; @@ -1024,8 +1006,6 @@ namespace BMA.EHR.Retirement.Service.Controllers dataRaw.posLevelRank = org.result.posLevelRank; dataRaw.posExecutiveId = org.result.posExecutiveId; dataRaw.posExecutiveName = org.result.posExecutiveName; - dataRaw.positionExecutiveField = org.result.positionExecutiveField; - dataRaw.positionArea = org.result.positionArea; dataRaw.posNo = org.result.posNo; _context.RetirementProfiles.Add(data); @@ -1045,7 +1025,7 @@ namespace BMA.EHR.Retirement.Service.Controllers { var data = new RetirementProfile { - Order = numRaw, + Order = num, Remove = "ADD", RetirementPeriod = retire, CreatedFullName = FullName ?? "System Administrator", @@ -1057,7 +1037,7 @@ namespace BMA.EHR.Retirement.Service.Controllers }; var dataRaw = new RetirementRawProfile { - Order = numRaw, + Order = profileRawCount + 1, Remove = "ADD", RetirementPeriod = retire, CreatedFullName = FullName ?? "System Administrator", @@ -1310,20 +1290,12 @@ namespace BMA.EHR.Retirement.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - - // แยกดึงข้อมูลเพื่อลดภาระ Database var retire = await _context.RetirementPeriods - //.Include(x => x.RetirementProfiles) - //.Include(x => x.RetirementRawProfiles) + .Include(x=>x.RetirementProfiles) + .Include(x=>x.RetirementRawProfiles) .FirstOrDefaultAsync(x => x.Id == retireId); - if (retire == null) return Error(GlobalMessages.RetirementNotFound, 404); - - // โหลดข้อมูลลูกแยกกัน - var profiles = await _context.RetirementProfiles.Where(x => x.RetirementPeriod.Id == retireId).ToListAsync(); - var rawProfiles = await _context.RetirementRawProfiles.Where(x => x.RetirementPeriod.Id == retireId).ToListAsync(); - if (Request.Form.Files != null && Request.Form.Files.Count != 0) { var file = Request.Form.Files[0]; @@ -1332,19 +1304,13 @@ namespace BMA.EHR.Retirement.Service.Controllers var doc = await _documentService.UploadFileAsync(file, file.FileName); var _doc = await _context.Documents.AsQueryable() .FirstOrDefaultAsync(x => x.Id == doc.Id); + retire.SignDate = req.signDate; retire.Document = _doc; retire.LastUpdateFullName = FullName ?? "System Administrator"; retire.LastUpdateUserId = UserId ?? ""; retire.LastUpdatedAt = DateTime.Now; } - else - { - retire.SignDate = req.signDate; - retire.LastUpdateFullName = FullName ?? "System Administrator"; - retire.LastUpdateUserId = UserId ?? ""; - retire.LastUpdatedAt = DateTime.Now; - } - if (retire.TypeReport == null) + if(retire.TypeReport == null) { var apiUrl = $"{_configuration["API"]}/org/root/search/sort"; dynamic rootOrder = new List(); @@ -1358,7 +1324,7 @@ namespace BMA.EHR.Retirement.Service.Controllers { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -1378,30 +1344,28 @@ namespace BMA.EHR.Retirement.Service.Controllers } var order = 1; - foreach (var profile in profiles - .OrderBy(x => string.IsNullOrEmpty(x.root) ? int.MaxValue : rootOrder.ToObject>().IndexOf(x.root)) + foreach (var profile in retire.RetirementProfiles + .OrderBy(x => rootOrder.ToObject>().IndexOf(x.root)) .ThenBy(x => child1Order.ToObject>().IndexOf(x.child1 ?? "")) .ThenBy(x => child2Order.ToObject>().IndexOf(x.child2 ?? "")) .ThenBy(x => child3Order.ToObject>().IndexOf(x.child3 ?? "")) .ThenBy(x => child4Order.ToObject>().IndexOf(x.child4 ?? "")) .ThenBy(x => posTypeNameOrder.ToObject>().IndexOf(x.posTypeName ?? "")) - .ThenBy(x => posLevelNameOrder.ToObject>().IndexOf(x.posLevelName ?? "")) - .ThenBy(x => x.posNo)) + .ThenBy(x => posLevelNameOrder.ToObject>().IndexOf(x.posLevelName ?? ""))) { profile.Order = order; order++; } order = 1; - foreach (var profile in rawProfiles - .OrderBy(x => string.IsNullOrEmpty(x.root) ? int.MaxValue : rootOrder.ToObject>().IndexOf(x.root)) + foreach (var profile in retire.RetirementRawProfiles + .OrderBy(x => rootOrder.ToObject>().IndexOf(x.root)) .ThenBy(x => child1Order.ToObject>().IndexOf(x.child1 ?? "")) .ThenBy(x => child2Order.ToObject>().IndexOf(x.child2 ?? "")) .ThenBy(x => child3Order.ToObject>().IndexOf(x.child3 ?? "")) .ThenBy(x => child4Order.ToObject>().IndexOf(x.child4 ?? "")) .ThenBy(x => posTypeNameOrder.ToObject>().IndexOf(x.posTypeName ?? "")) - .ThenBy(x => posLevelNameOrder.ToObject>().IndexOf(x.posLevelName ?? "")) - .ThenBy(x => x.posNo)) + .ThenBy(x => posLevelNameOrder.ToObject>().IndexOf(x.posLevelName ?? ""))) { profile.Order = order; order++; @@ -2126,19 +2090,18 @@ namespace BMA.EHR.Retirement.Service.Controllers { var retirePeriodOfficer = await _context.RetirementPeriods .Include(x => x.RetirementRawProfiles.Where(y => y.Remove != "REMOVE")) - .Where(x => x.Year == year && (x.Type ?? "").Trim().ToUpper().Contains(type) && x.Round == 1) + .Where(x => x.Year == year && x.Type.Trim().ToUpper().Contains(type)) .FirstOrDefaultAsync(); if (retirePeriodOfficer == null) return Error("ไม่พบรอบประกาศเกษียณอายุราชการ"); - var data = new - { - signDate = retirePeriodOfficer.SignDate ?? null, - profiles = retirePeriodOfficer.RetirementRawProfiles - .Select(x => new { profileId = x.profileId }) - .ToList() - }; + var data = retirePeriodOfficer.RetirementRawProfiles + .Select(x => new + { + profileId = x.profileId + }) + .ToList(); return Success(data); } @@ -2156,7 +2119,7 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpGet("31/{exportType}/{Id}")] public async Task> GetProfileRetirement([FromRoute] Guid Id, string exportType = "pdf") { - var retire = await _service.GetProfileRetirementdAsync(Id, token); + var retire = await _service.GetProfileRetirementdAsync(Id,token); if (retire != null) { var reportfile = string.Empty; @@ -2217,83 +2180,5 @@ namespace BMA.EHR.Retirement.Service.Controllers } } #endregion - - #region รายงานรายชื่อผู้เกษียณอายุราชการ ข้าราชการ & ลูกจ้างประจำ - /// - /// รายงานรายชื่อผู้เกษียณอายุราชการ ข้าราชการ & ลูกจ้างประจำ - /// - /// Id ของรอบเกษียณ - /// pdf, docx - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("report/{exportType}/{Id}")] - public async Task> GetReportProfileRetirement([FromRoute] Guid Id, string exportType = "pdf") - { - var retire = await _service.GetProfileRetirementdAsync(Id, token); - if (retire != null) - { - var reportfile = string.Empty; - exportType = exportType.Trim(); - - switch (retire.GetType().GetProperty("Type").GetValue(retire)) - { - case "OFFICER": - if (string.IsNullOrEmpty(retire.GetType().GetProperty("TypeReport").GetValue(retire))) - { - reportfile = $"retire-1"; - } - else if (retire.GetType().GetProperty("TypeReport").GetValue(retire) == "ADD" || retire.GetType().GetProperty("TypeReport").GetValue(retire) == "EDIT") - { - reportfile = $"retire-2"; - } - else if (retire.GetType().GetProperty("TypeReport").GetValue(retire) == "REMOVE") - { - reportfile = $"retire-3"; - } - else - { - return Error(retire.GetType().GetProperty("TypeReport").GetValue(retire)); - } - break; - case "EMPLOYEE": - if (string.IsNullOrEmpty(retire.GetType().GetProperty("TypeReport").GetValue(retire))) - { - reportfile = $"retire-emp-1"; - } - else if (retire.GetType().GetProperty("TypeReport").GetValue(retire) == "ADD" || retire.GetType().GetProperty("TypeReport").GetValue(retire) == "EDIT") - { - reportfile = $"retire-emp-2"; - } - else if (retire.GetType().GetProperty("TypeReport").GetValue(retire) == "REMOVE") - { - reportfile = $"retire-emp-3"; - } - else - { - return Error(retire.GetType().GetProperty("TypeReport").GetValue(retire)); - } - break; - default: - return Error(retire.GetType().GetProperty("Type").GetValue(retire)); - } - - var reportBytes = await _reportService.GenerateReportAsync(reportfile, retire, exportType); - - var fileName = $"reportRetirement-{DateTime.Now:yyyyMMdd-HHmmss}.{exportType}"; - var contentType = exportType.Trim().ToLower() == "pdf" - ? "application/pdf" - : "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; - - return File(reportBytes, contentType, fileName); - - } - else - { - return NotFound(); - } - } - #endregion } } diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs index cf9f153d..36d3f01d 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs @@ -2,7 +2,6 @@ using BMA.EHR.Application.Repositories.MessageQueue; using BMA.EHR.Application.Repositories.Reports; using BMA.EHR.Application.Responses; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Models.Retirement; using BMA.EHR.Domain.Shared; @@ -35,7 +34,6 @@ namespace BMA.EHR.Retirement.Service.Controllers private readonly MinIOService _documentService; private readonly IConfiguration _configuration; private readonly IHttpContextAccessor _httpContextAccessor; - private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; public RetirementDeceasedController(RetirementRepository repository, @@ -45,7 +43,6 @@ namespace BMA.EHR.Retirement.Service.Controllers MinIOService documentService, IConfiguration configuration, IHttpContextAccessor httpContextAccessor, - UserProfileRepository userProfileRepository, PermissionRepository permission) { _repository = repository; @@ -55,7 +52,6 @@ namespace BMA.EHR.Retirement.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _configuration = configuration; - _userProfileRepository = userProfileRepository; _permission = permission; } @@ -65,7 +61,6 @@ namespace BMA.EHR.Retirement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -80,50 +75,25 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpGet()] public async Task> GetList() { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_PASSAWAY"); + var getPermission = await _permission.GetPermissionOrgAPIAsync("LIST", "SYS_PASSAWAY", UserId); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - var node = profileAdmin?.Node; + string?[] rootId = jsonData?.result?.rootId ?? null; + string?[] child1Id = jsonData?.result?.child1Id ?? null; + string?[] child2Id = jsonData?.result?.child2Id ?? null; + string?[] child3Id = jsonData?.result?.child3Id ?? null; + string?[] child4Id = jsonData?.result?.child4Id ?? null; var retirementDeceaseds = await _context.RetirementDeceaseds.AsQueryable() .OrderByDescending(x => x.CreatedAt) + .Where(x => rootId == null ? true : rootId.Contains(x.rootId)) + .Where(x => child1Id == null ? true : child1Id.Contains(x.child1Id)) + .Where(x => child2Id == null ? true : child2Id.Contains(x.child2Id)) + .Where(x => child3Id == null ? true : child3Id.Contains(x.child3Id)) + .Where(x => child4Id == null ? true : child4Id.Contains(x.child4Id)) .Select(p => new { p.Id, @@ -150,49 +120,8 @@ namespace BMA.EHR.Retirement.Service.Controllers p.posTypeName, p.CreatedAt, p.IsActive, - p.rootDnaId, - p.child1DnaId, - p.child2DnaId, - p.child3DnaId, - p.child4DnaId, }) .ToListAsync(); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - retirementDeceaseds = retirementDeceaseds - .Where(x => node == 4 ? x.child4DnaId == nodeId : (node == 3 ? x.child3DnaId == nodeId : (node == 2 ? x.child2DnaId == nodeId : (node == 1 ? x.child1DnaId == nodeId : (node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - retirementDeceaseds = retirementDeceaseds - .Where(x => node == 4 ? x.child3DnaId == nodeId : (node == 3 ? x.child2DnaId == nodeId : (node == 2 ? x.child1DnaId == nodeId : (node == 1 || node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - retirementDeceaseds = retirementDeceaseds - .Where(x => x.rootDnaId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // retirementDeceaseds = retirementDeceaseds - // .Where(x => x.rootDnaId == nodeId && x.child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - retirementDeceaseds = retirementDeceaseds.Where(x => - node == 0 ? x.rootDnaId == nodeId && x.child1DnaId == null : - node == 1 ? x.child1DnaId == nodeId && x.child2DnaId == null : - node == 2 ? x.child2DnaId == nodeId && x.child3DnaId == null : - node == 3 ? x.child3DnaId == nodeId && x.child4DnaId == null : - node == 4 ? x.child4DnaId == nodeId : - true - ).ToList(); - } return Success(retirementDeceaseds); } @@ -323,7 +252,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -361,8 +290,6 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementDeceased.posMasterNo = org.result.posMasterNo; retirementDeceased.position = org.result.position; retirementDeceased.PositionExecutiveOld = org.result.posExecutiveName; - retirementDeceased.positionExecutiveFieldOld = org.result.positionExecutiveField; - retirementDeceased.positionAreaOld = org.result.positionArea; retirementDeceased.posTypeId = org.result.posTypeId; retirementDeceased.posTypeName = $"{org.result.posTypeShortName} {org.result.posTypeName}"; retirementDeceased.posLevelId = org.result.posLevelId; @@ -376,12 +303,12 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, _apiUrl); var _res = await client.PostAsJsonAsync(_apiUrl, new { isLeave = true, - leaveReason = retirementDeceased.Reason, + leaveReason = "ถึงแก่กรรม", dateLeave = req.Date, }); var _result = await _res.Content.ReadAsStringAsync(); @@ -393,7 +320,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -443,12 +370,12 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, _apiUrl); var _res = await client.PostAsJsonAsync(_apiUrl, new { isLeave = true, - leaveReason = retirementDeceased.Reason, + leaveReason = "ถึงแก่กรรม", dateLeave = req.Date, }); var _result = await _res.Content.ReadAsStringAsync(); @@ -492,7 +419,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.PostAsJsonAsync(pathUrl, new { persons = new List @@ -513,8 +440,7 @@ namespace BMA.EHR.Retirement.Service.Controllers { name = "หนังสือเวียนถึงแก่กรรม", url = $"{_configuration["API"]}/retirement/deceased/report/36/{retirementDeceased.Id}", - isReport = true, - isTemplate = true + isReport = true }); var payload = new CommandPayload() @@ -525,8 +451,7 @@ namespace BMA.EHR.Retirement.Service.Controllers var payload_str = JsonConvert.SerializeObject(payload); await _repositoryNoti.PushNotificationAsync( Guid.Parse(higher.profileId), - //$"หนังสือเวียนถึงแก่กรรมของ {higher.prefix}{higher.firstName} {higher.lastName}", - $"แจ้งข่าวการถึงแก่กรรมของ {retirementDeceased.prefix}{retirementDeceased.firstName} {retirementDeceased.lastName}", + $"หนังสือเวียนถึงแก่กรรมของ {higher.prefix}{higher.firstName} {higher.lastName}", $"แจ้งข่าวการถึงแก่กรรมของ {retirementDeceased.prefix}{retirementDeceased.firstName} {retirementDeceased.lastName}", payload_str, "", @@ -554,7 +479,7 @@ namespace BMA.EHR.Retirement.Service.Controllers LastUpdatedAt = DateTime.Now, }); } - } + } } await _context.SaveChangesAsync(); @@ -724,32 +649,32 @@ namespace BMA.EHR.Retirement.Service.Controllers }; //if (retirementDeceased.profileType.Trim().ToUpper() == "OFFICER") //{ - var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{item.ProfileId}"; - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); - var _res = await client.SendAsync(_req); - var _result = await _res.Content.ReadAsStringAsync(); + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{item.ProfileId}"; + using (var client = new HttpClient()) + { + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); + var _res = await client.SendAsync(_req); + var _result = await _res.Content.ReadAsStringAsync(); - var org = JsonConvert.DeserializeObject(_result); + var org = JsonConvert.DeserializeObject(_result); - if (org == null || org.result == null) - continue; + if (org == null || org.result == null) + continue; - retirementDeceasedNoti.Prefix = org.result.prefix == null ? "" : org.result.prefix; - retirementDeceasedNoti.FirstName = org.result.firstName == null ? "" : org.result.firstName; - retirementDeceasedNoti.LastName = org.result.lastName == null ? "" : org.result.lastName; - retirementDeceasedNoti.CitizenId = org.result.citizenId == null ? "" : org.result.citizenId; - retirementDeceasedNoti.PositionName = org.result.position == null ? "" : org.result.position; - retirementDeceasedNoti.OrganizationName = (org.result.child4 == null ? "" : org.result.child4 + "\n") + - (org.result.child3 == null ? "" : org.result.child3 + "\n") + - (org.result.child2 == null ? "" : org.result.child2 + "\n") + - (org.result.child1 == null ? "" : org.result.child1 + "\n") + - (org.result.root == null ? "" : org.result.root); - retirementDeceased.RetirementDeceasedNotis.Add(retirementDeceasedNoti); - } + retirementDeceasedNoti.Prefix = org.result.prefix == null ? "" : org.result.prefix; + retirementDeceasedNoti.FirstName = org.result.firstName == null ? "" : org.result.firstName; + retirementDeceasedNoti.LastName = org.result.lastName == null ? "" : org.result.lastName; + retirementDeceasedNoti.CitizenId = org.result.citizenId == null ? "" : org.result.citizenId; + retirementDeceasedNoti.PositionName = org.result.position == null ? "" : org.result.position; + retirementDeceasedNoti.OrganizationName = (org.result.child4 == null ? "" : org.result.child4 + "\n") + + (org.result.child3 == null ? "" : org.result.child3 + "\n") + + (org.result.child2 == null ? "" : org.result.child2 + "\n") + + (org.result.child1 == null ? "" : org.result.child1 + "\n") + + (org.result.root == null ? "" : org.result.root); + retirementDeceased.RetirementDeceasedNotis.Add(retirementDeceasedNoti); + } //} //else //{ @@ -757,7 +682,7 @@ namespace BMA.EHR.Retirement.Service.Controllers // using (var client = new HttpClient()) // { // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + // client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); // var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); // var _res = await client.SendAsync(_req); // var _result = await _res.Content.ReadAsStringAsync(); @@ -850,8 +775,7 @@ namespace BMA.EHR.Retirement.Service.Controllers name = "หนังสือเวียนถึงแก่กรรม", //url = $"{_configuration["APIV2"]}/report/deceased/copy/36/{retirementDeceased.Id}" url = $"{_configuration["API"]}/retirement/deceased/report/36/{retirementDeceased.Id}", - isReport = true, - isTemplate = true + isReport = true }); var payload = new CommandPayload() @@ -871,7 +795,7 @@ namespace BMA.EHR.Retirement.Service.Controllers { await _repositoryNoti.PushNotificationAsync( Guid.Parse(item.profileId), - $"แจ้งข่าวการถึงแก่กรรมของ {item.RetirementDeceased.prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", + $"หนังสือเวียนถึงแก่กรรมของ {item.RetirementDeceased.prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", $"แจ้งข่าวการถึงแก่กรรมของ {item.RetirementDeceased.prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", payload_str, "", @@ -889,7 +813,7 @@ namespace BMA.EHR.Retirement.Service.Controllers { await _repositoryNoti.PushNotificationAsync( Guid.Parse(item.profileId), - $"แจ้งข่าวการถึงแก่กรรมของ {item.RetirementDeceased.prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", + $"หนังสือเวียนถึงแก่กรรมของ {item.RetirementDeceased.prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", $"แจ้งข่าวการถึงแก่กรรมของ {item.RetirementDeceased.prefix}{item.RetirementDeceased.firstName} {item.RetirementDeceased.lastName}", payload_str, "", diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs index b1580cf5..6152ec16 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs @@ -1,6 +1,5 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Models.Retirement; @@ -32,7 +31,6 @@ namespace BMA.EHR.Retirement.Service.Controllers private readonly MinIOService _documentService; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; public RetirementOtherController(RetirementRepository repository, @@ -41,7 +39,6 @@ namespace BMA.EHR.Retirement.Service.Controllers MinIOService documentService, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - UserProfileRepository userProfileRepository, PermissionRepository permission) { _repository = repository; @@ -50,7 +47,6 @@ namespace BMA.EHR.Retirement.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _configuration = configuration; - _userProfileRepository = userProfileRepository; _permission = permission; } @@ -60,7 +56,6 @@ namespace BMA.EHR.Retirement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -82,168 +77,135 @@ namespace BMA.EHR.Retirement.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") + var rootId = ""; + var child1Id = ""; + var child2Id = ""; + var child3Id = ""; + var child4Id = ""; + var apiUrl = $"{_configuration["API"]}/org/permission/checkOrg/{UserId}"; + using (var client = new HttpClient()) { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); + var _res = await client.SendAsync(_req); + var _result = await _res.Content.ReadAsStringAsync(); - var node = profileAdmin?.Node; - var retirementOthers = await _context.RetirementOthers.AsQueryable() - .OrderByDescending(x => x.CreatedAt) - .Select(p => new - { - p.Id, - p.citizenId, - p.profileId, - p.prefix, - p.firstName, - p.lastName, - p.root, - p.rootId, - p.rootShortName, - p.child1, - p.child1Id, - p.child1ShortName, - p.child2, - p.child2Id, - p.child2ShortName, - p.child3, - p.child3Id, - p.child3ShortName, - p.child4, - p.child4Id, - p.child4ShortName, - p.orgRevisionId, - p.positionId, - p.posMasterNo, - p.position, - p.PositionExecutive, - p.positionField, - p.posTypeId, - p.posTypeName, - p.posLevelId, - p.posLevelName, - node = p.root == null ? (int?)null : (p.child1 == null ? 0 : (p.child2 == null ? 1 : (p.child3 == null ? 2 : (p.child4 == null ? 3 : 4)))), - nodeName = p.root == null ? null : (p.child1 == null ? p.root : (p.child2 == null ? p.child1 : (p.child3 == null ? p.child2 : (p.child4 == null ? p.child3 : p.child4)))), - nodeId = p.rootId == null ? null : (p.child1Id == null ? p.rootId : (p.child2Id == null ? p.child1Id : (p.child3Id == null ? p.child2Id : (p.child4Id == null ? p.child3Id : p.child4Id)))), - nodeShortName = p.rootShortName == null ? null : (p.child1ShortName == null ? p.rootShortName : (p.child2ShortName == null ? p.child1ShortName : (p.child3ShortName == null ? p.child2ShortName : (p.child4ShortName == null ? p.child3ShortName : p.child4ShortName)))), + var org = JsonConvert.DeserializeObject(_result); - p.rootOld, - p.rootOldId, - p.rootShortNameOld, - p.child1Old, - p.child1OldId, - p.child1ShortNameOld, - p.child2Old, - p.child2OldId, - p.child2ShortNameOld, - p.child3Old, - p.child3OldId, - p.child3ShortNameOld, - p.child4Old, - p.child4OldId, - p.child4ShortNameOld, - p.PositionOld, - p.PositionExecutiveOld, - p.posMasterNoOld, - p.posTypeOldId, - p.posTypeNameOld, - p.posLevelOldId, - p.posLevelNameOld, + if (org == null || org.result == null) + return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); + rootId = org.result.rootId == null ? "" : org.result.rootId; + child1Id = org.result.child1Id == null ? "" : org.result.child1Id; + child2Id = org.result.child2Id == null ? "" : org.result.child2Id; + child3Id = org.result.child3Id == null ? "" : org.result.child3Id; + child4Id = org.result.child4Id == null ? "" : org.result.child4Id; - p.Status, - p.Amount, - p.ReportingDate, + var retirementOthers = await _context.RetirementOthers.AsQueryable() + .OrderByDescending(x => x.CreatedAt) + // .Where(x => rootId == "" ? true : (child1Id == "" ? x.rootOldId == rootId : (child2Id == "" ? x.child1OldId == child1Id : (child3Id == "" ? x.child2OldId == child2Id : (child4Id == "" ? x.child3OldId == child3Id : x.child4OldId == child4Id))))) + .Select(p => new + { + p.Id, + p.citizenId, + p.profileId, + p.prefix, + p.firstName, + p.lastName, + p.root, + p.rootId, + p.rootShortName, + p.child1, + p.child1Id, + p.child1ShortName, + p.child2, + p.child2Id, + p.child2ShortName, + p.child3, + p.child3Id, + p.child3ShortName, + p.child4, + p.child4Id, + p.child4ShortName, + p.orgRevisionId, + p.positionId, + p.posMasterNo, + p.position, + p.PositionExecutive, + p.positionField, + p.posTypeId, + p.posTypeName, + p.posLevelId, + p.posLevelName, + node = p.root == null ? (int?)null : (p.child1 == null ? 0 : (p.child2 == null ? 1 : (p.child3 == null ? 2 : (p.child4 == null ? 3 : 4)))), + nodeName = p.root == null ? null : (p.child1 == null ? p.root : (p.child2 == null ? p.child1 : (p.child3 == null ? p.child2 : (p.child4 == null ? p.child3 : p.child4)))), + nodeId = p.rootId == null ? null : (p.child1Id == null ? p.rootId : (p.child2Id == null ? p.child1Id : (p.child3Id == null ? p.child2Id : (p.child4Id == null ? p.child3Id : p.child4Id)))), + nodeShortName = p.rootShortName == null ? null : (p.child1ShortName == null ? p.rootShortName : (p.child2ShortName == null ? p.child1ShortName : (p.child3ShortName == null ? p.child2ShortName : (p.child4ShortName == null ? p.child3ShortName : p.child4ShortName)))), - p.CreatedAt, - p.Reason, - p.MilitaryDate, - p.EducationOld, - p.AmountOld, - p.PositionTypeOld, - p.PositionLevelOld, - p.PositionNumberOld, - p.OrganizationPositionOld, - p.posmasterId, - p.PositionDate, - CommandType = p.CommandType == null ? null : p.CommandType.Name, - p.rootDnaOldId, - p.child1DnaOldId, - p.child2DnaOldId, - p.child3DnaOldId, - p.child4DnaOldId, - }) - .ToListAsync(); + p.rootOld, + p.rootOldId, + p.rootShortNameOld, + p.child1Old, + p.child1OldId, + p.child1ShortNameOld, + p.child2Old, + p.child2OldId, + p.child2ShortNameOld, + p.child3Old, + p.child3OldId, + p.child3ShortNameOld, + p.child4Old, + p.child4OldId, + p.child4ShortNameOld, + p.PositionOld, + p.PositionExecutiveOld, + p.posMasterNoOld, + p.posTypeOldId, + p.posTypeNameOld, + p.posLevelOldId, + p.posLevelNameOld, - if (status != null && status.Trim().ToUpper() != "ALL") - retirementOthers = retirementOthers.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); + p.Status, + p.Amount, + p.ReportingDate, - if (role == "OWNER") - { - node = null; + p.CreatedAt, + p.Reason, + p.MilitaryDate, + p.EducationOld, + p.AmountOld, + p.PositionTypeOld, + p.PositionLevelOld, + p.PositionNumberOld, + p.OrganizationPositionOld, + p.posmasterId, + p.PositionDate, + CommandType = p.CommandType == null ? null : p.CommandType.Name, + }) + .ToListAsync(); + // if (keyword != "") + // { + // var data = retirementOthers.Where(x => + // (x.prefix != null && x.prefix.Contains(keyword)) || + // (x.firstName != null && x.firstName.Contains(keyword)) || + // (x.lastName != null && x.lastName.Contains(keyword)) || + // (x.rootShortNameOld != null && x.rootShortNameOld.Contains(keyword)) || + // (x.posMasterNoOld != null && x.posMasterNoOld.ToString().Contains(keyword)) || + // (x.posTypeNameOld != null && x.posTypeNameOld.Contains(keyword)) || + // (x.posLevelNameOld != null && x.posLevelNameOld.Contains(keyword)) || + // (x.OrganizationPositionOld != null && x.OrganizationPositionOld.Contains(keyword)) || + // (x.Reason != null && x.Reason.Contains(keyword))) + // .OrderByDescending(x => x.CreatedAt) + // .Skip((page - 1) * pageSize) + // .Take(pageSize) + // .ToList(); + + // retirementOthers = data; + // } + if (status != null && status.Trim().ToUpper() != "ALL") + retirementOthers = retirementOthers.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); + return Success(retirementOthers); } - if (role == "OWNER" || role == "CHILD") - { - retirementOthers = retirementOthers - .Where(x => node == 4 ? x.child4DnaOldId == nodeId : (node == 3 ? x.child3DnaOldId == nodeId : (node == 2 ? x.child2DnaOldId == nodeId : (node == 1 ? x.child1DnaOldId == nodeId : (node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - retirementOthers = retirementOthers - .Where(x => node == 4 ? x.child3DnaOldId == nodeId : (node == 3 ? x.child2DnaOldId == nodeId : (node == 2 ? x.child1DnaOldId == nodeId : (node == 1 || node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - retirementOthers = retirementOthers - .Where(x => x.rootDnaOldId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // retirementOthers = retirementOthers - // .Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList(); - // } - else if (role == "NORMAL") - { - retirementOthers = retirementOthers.Where(x => - node == 0 ? x.rootDnaOldId == nodeId && x.child1DnaOldId == null : - node == 1 ? x.child1DnaOldId == nodeId && x.child2DnaOldId == null : - node == 2 ? x.child2DnaOldId == nodeId && x.child3DnaOldId == null : - node == 3 ? x.child3DnaOldId == nodeId && x.child4DnaOldId == null : - node == 4 ? x.child4DnaOldId == nodeId : - true - ).ToList(); - } - return Success(retirementOthers); } /// @@ -386,21 +348,11 @@ namespace BMA.EHR.Retirement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - var apiUrl = string.Empty; - if (req.profileType.Trim().ToUpper() == "EMPLOYEE") - { - - apiUrl = $"{_configuration["API"]}/org/profile-employee/profileid/position/{req.Id}"; - } - else - { - apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.Id}"; - } - + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.Id}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -444,15 +396,15 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementOther.LeaveDate = org.result.leaveDate; retirementOther.PositionOld = org.result.position; retirementOther.PositionExecutiveOld = org.result.posExecutiveName; - retirementOther.positionExecutiveFieldOld = org.result.positionExecutiveField; - retirementOther.positionAreaOld = org.result.positionArea; retirementOther.PositionLevelOld = org.result.posLevelName; retirementOther.PositionTypeOld = org.result.posTypeName; - retirementOther.PositionNumberOld = org.result.posNo; - retirementOther.OrganizationOld = org.result.org ?? ""; - retirementOther.OrganizationPositionOld = org.result.position + "\n" + - (retirementOther.PositionExecutiveOld == null ? "" : (retirementOther.positionExecutiveField == null ? retirementOther.PositionExecutiveOld + "\n" : retirementOther.PositionExecutiveOld + "(" + retirementOther.positionExecutiveField + ")" + "\n")) - + retirementOther.OrganizationOld; + retirementOther.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; + retirementOther.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + + (org.result.child3 == null ? "" : org.result.child3 + "\n") + + (org.result.child2 == null ? "" : org.result.child2 + "\n") + + (org.result.child1 == null ? "" : org.result.child1 + "\n") + + (org.result.root == null ? "" : org.result.root); + retirementOther.OrganizationPositionOld = org.result.position + "\n" + (retirementOther.PositionExecutiveOld == null ? "" : retirementOther.PositionExecutiveOld + "\n") + retirementOther.OrganizationOld; retirementOther.EducationOld = org.result.education; retirementOther.AmountOld = org.result.salary; } @@ -512,7 +464,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Post, apiUrl); var _res = await client.PostAsJsonAsync(apiUrl, new { @@ -550,7 +502,7 @@ namespace BMA.EHR.Retirement.Service.Controllers // using (var client = new HttpClient()) // { // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + // client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); // var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new // { // posMasterOldId = uppdated.posmasterId, @@ -565,10 +517,7 @@ namespace BMA.EHR.Retirement.Service.Controllers uppdated.positionId = req.positionId; uppdated.posMasterNo = req.posMasterNo; uppdated.position = req.positionName; - uppdated.posExecutiveId = req.posExecutiveId; uppdated.PositionExecutive = req.posExecutiveName; - uppdated.positionExecutiveField = req.positionExecutiveField; - uppdated.positionArea = req.positionArea; uppdated.positionField = req.positionField; uppdated.posTypeId = req.posTypeId; uppdated.posTypeName = req.posTypeName; @@ -765,28 +714,21 @@ namespace BMA.EHR.Retirement.Service.Controllers No = r.Sequence.ToString().ToThaiNumber(), FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", Education = p.EducationOld == null ? "-" : p.EducationOld, - OldOc = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld.ToThaiNumber(), + OldOc = (p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld) + "\n" + (p.rootOld == null ? "" : p.rootOld), OldPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld, OldPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld, OldPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), LeaveDate = p.LeaveDate == null ? "-" : p.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(), - NewOc = (p.position == null ? "" : $"{p.position}\n") + - (p.PositionExecutive == null ? "" : (p.positionArea == null ? $"{p.positionExecutiveField}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + - (p.child4 == null ? "" : $"{p.child4}\n") + - (p.child3 == null ? "" : $"{p.child3}\n") + - (p.child2 == null ? "" : $"{p.child2}\n") + - (p.child1 == null ? "" : $"{p.child1}\n") + - (p.root == null ? "" : $"{p.root}").ToThaiNumber(), - NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, - NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, - NewPositionNumber = p.rootShortName == null && p.posMasterNo == null ? null : $"{(p.child1ShortName == null ? p.rootShortName : (p.child2ShortName == null ? p.child1ShortName : (p.child3ShortName == null ? p.child2ShortName : (p.child4ShortName == null ? p.child3ShortName : p.child4ShortName))))}" + - $" {p.posMasterNo?.ToString().ToThaiNumber()}", + NewOc = (p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld) + "\n" + (p.rootOld == null ? "" : p.rootOld), + NewPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld, + NewPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld, + NewPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.PositionDate == null ? "-" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -842,7 +784,6 @@ namespace BMA.EHR.Retirement.Service.Controllers var data = await _context.RetirementOthers .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -854,9 +795,7 @@ namespace BMA.EHR.Retirement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutiveOld, - positionExecutiveField = p.positionExecutiveFieldOld, - positionArea = p.positionAreaOld, + positionExecutive = "", positionType = p.PositionTypeOld, positionLevel = p.PositionLevelOld, isLeave = false, @@ -883,61 +822,29 @@ namespace BMA.EHR.Retirement.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, positionTypeNew = p.posTypeId, positionLevelNew = p.posLevelId, positionNameNew = p.position, - posmasterId = p.posmasterId, - posTypeNameNew = p.posTypeName, - posLevelNameNew = p.posLevelName, - posNoNew = p.posMasterNo?.ToString(), - posNoAbbNew = p.child4ShortName != null ? $"{p.child4ShortName}" : - p.child3ShortName != null ? $"{p.child3ShortName}" : - p.child2ShortName != null ? $"{p.child2ShortName}" : - p.child1ShortName != null ? $"{p.child1ShortName}" : - p.rootShortName != null ? $"{p.rootShortName}" : "", - orgRootNew = p.root, - orgChild1New = p.child1, - orgChild2New = p.child2, - orgChild3New = p.child3, - orgChild4New = p.child4 }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // // // var _result = await _res.Content.ReadAsStringAsync(); - // // // if (_res.IsSuccessStatusCode) - // // // { - // // // data.ForEach(profile => profile.Status = "DONE"); - // // // await _context.SaveChangesAsync(); - // // // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -1027,29 +934,28 @@ namespace BMA.EHR.Retirement.Service.Controllers No = r.Sequence.ToString().ToThaiNumber(), FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", Education = p.EducationOld == null ? "-" : p.EducationOld, - OldOc = p.OrganizationPositionOld == null ? "-" : p.OrganizationPositionOld.ToThaiNumber(), + OldOc = p.OrganizationPositionOld == null ? "-" : p.OrganizationPositionOld, OldPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld, OldPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld, OldPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), LeaveDate = p.LeaveDate == null ? "-" : p.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(), MilitaryDate = p.MilitaryDate == null ? "-" : p.MilitaryDate.Value.ToThaiShortDate2().ToThaiNumber(), - NewOc = (p.position == null ? "" : $"{p.position}\n") + - (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + - (p.child4 == null ? "" : $"{p.child4}\n") + - (p.child3 == null ? "" : $"{p.child3}\n") + - (p.child2 == null ? "" : $"{p.child2}\n") + - (p.child1 == null ? "" : $"{p.child1}\n") + - (p.root == null ? "" : $"{p.root}").ToThaiNumber(), - NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, - NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, - NewPositionNumber = p.rootShortName == null && p.posMasterNo == null ? null : $"{(p.child1ShortName == null ? p.rootShortName : (p.child2ShortName == null ? p.child1ShortName : (p.child3ShortName == null ? p.child2ShortName : (p.child4ShortName == null ? p.child3ShortName : p.child4ShortName))))}" + - $" {p.posMasterNo?.ToString().ToThaiNumber()}", + NewOc = (p.PositionOld == null ? "" : $"{p.PositionOld}\n") + + (p.PositionExecutiveOld == null ? "" : $"{p.PositionExecutiveOld}\n") + + (p.child4Old == null ? "" : $"{p.child4Old}\n") + + (p.child3Old == null ? "" : $"{p.child3Old}\n") + + (p.child2Old == null ? "" : $"{p.child2Old}\n") + + (p.child1Old == null ? "" : $"{p.child1Old}\n") + + (p.rootOld == null ? "" : $"{p.rootOld}"), + NewPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld, + NewPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld, + NewPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.PositionDate == null ? "-" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -1106,7 +1012,6 @@ namespace BMA.EHR.Retirement.Service.Controllers var data = await _context.RetirementOthers .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - string? _null = null; var resultData = (from p in data join r in req.refIds @@ -1118,9 +1023,7 @@ namespace BMA.EHR.Retirement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutiveOld, - positionExecutiveField = p.positionExecutiveFieldOld, - positionArea = p.positionAreaOld, + positionExecutive = "", positionType = p.PositionTypeOld, positionLevel = p.PositionLevelOld, isLeave = false, @@ -1147,61 +1050,29 @@ namespace BMA.EHR.Retirement.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - positionId = p.positionId, - posExecutiveId = p.posExecutiveId, - positionField = p.positionField, positionTypeNew = p.posTypeId, positionLevelNew = p.posLevelId, positionNameNew = p.position, - posmasterId = p.posmasterId, - posTypeNameNew = p.posTypeName, - posLevelNameNew = p.posLevelName, - posNoNew = p.posMasterNo?.ToString(), - posNoAbbNew = p.child4ShortName != null ? $"{p.child4ShortName}" : - p.child3ShortName != null ? $"{p.child3ShortName}" : - p.child2ShortName != null ? $"{p.child2ShortName}" : - p.child1ShortName != null ? $"{p.child1ShortName}" : - p.rootShortName != null ? $"{p.rootShortName}" : "", - orgRootNew = p.root, - orgChild1New = p.child1, - orgChild2New = p.child2, - orgChild3New = p.child3, - orgChild4New = p.child4 }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // // // var _result = await _res.Content.ReadAsStringAsync(); - // // // if (_res.IsSuccessStatusCode) - // // // { - // // // data.ForEach(profile => profile.Status = "DONE"); - // // // await _context.SaveChangesAsync(); - // // // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } } } diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs index 4ef0e395..db256dfe 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs @@ -1,9 +1,7 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; -using BMA.EHR.Domain.Models.Placement; using BMA.EHR.Domain.Models.Retirement; using BMA.EHR.Domain.Shared; using BMA.EHR.Infrastructure.Persistence; @@ -33,7 +31,6 @@ namespace BMA.EHR.Retirement.Service.Controllers private readonly MinIOService _documentService; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; public RetirementOutController(RetirementRepository repository, @@ -42,7 +39,6 @@ namespace BMA.EHR.Retirement.Service.Controllers MinIOService documentService, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - UserProfileRepository userProfileRepository, PermissionRepository permission) { _repository = repository; @@ -51,7 +47,6 @@ namespace BMA.EHR.Retirement.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _configuration = configuration; - _userProfileRepository = userProfileRepository; _permission = permission; } @@ -61,7 +56,6 @@ namespace BMA.EHR.Retirement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion @@ -75,156 +69,91 @@ namespace BMA.EHR.Retirement.Service.Controllers /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpGet("{type}")] - public async Task> GetListByAdmin(string type, string? status = "") + public async Task> GetListByAdmin(string type, string? status = "WAITTING") { - string role = ""; - if (type.Trim().ToUpper() == "OFFICER") + var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISMISS"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISMISS"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - role = jsonData["result"]?.ToString(); + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - else + var rootId = ""; + var child1Id = ""; + var child2Id = ""; + var child3Id = ""; + var child4Id = ""; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; + using (var client = new HttpClient()) { - var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISMISS_EMP"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - role = jsonData["result"]?.ToString(); - } - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); + var _res = await client.SendAsync(_req); + var _result = await _res.Content.ReadAsStringAsync(); - var node = profileAdmin?.Node; - var retirementOuts = await _context.RetirementOuts.AsQueryable() - .OrderByDescending(x => x.CreatedAt) - .Where(x => x.profileType.Trim().ToUpper().Contains(type.Trim().ToUpper())) - .Select(p => new - { - p.Id, - p.profileType, - p.citizenId, - p.profileId, - p.prefix, - p.firstName, - p.lastName, - p.rootOld, - p.rootOldId, - p.rootShortNameOld, - p.child1Old, - p.child1OldId, - p.child1ShortNameOld, - p.child2Old, - p.child2OldId, - p.child2ShortNameOld, - p.child3Old, - p.child3OldId, - p.child3ShortNameOld, - p.child4Old, - p.child4OldId, - p.child4ShortNameOld, - p.PositionOld, - p.PositionExecutiveOld, - p.posMasterNoOld, - p.posTypeOldId, - p.posTypeNameOld, - p.posLevelOldId, - p.posLevelNameOld, - p.CreatedAt, - p.Organization, - p.Reason, - p.Status, - p.Date, - salary = p.AmountOld, - p.PositionTypeOld, - p.PositionLevelOld, - p.PositionNumberOld, - p.OrganizationPositionOld, - p.IsActive, - p.rootDnaOldId, - p.child1DnaOldId, - p.child2DnaOldId, - p.child3DnaOldId, - p.child4DnaOldId, - }) - .ToListAsync(); + var org = JsonConvert.DeserializeObject(_result); - if (!string.IsNullOrEmpty(status)) - retirementOuts = retirementOuts.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); + if (org == null || org.result == null) + return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); + rootId = org.result.rootId == null ? "" : org.result.rootId; + child1Id = org.result.child1Id == null ? "" : org.result.child1Id; + child2Id = org.result.child2Id == null ? "" : org.result.child2Id; + child3Id = org.result.child3Id == null ? "" : org.result.child3Id; + child4Id = org.result.child4Id == null ? "" : org.result.child4Id; - if (role == "OWNER") - { - node = null; + var retirementOuts = await _context.RetirementOuts.AsQueryable() + .OrderByDescending(x => x.CreatedAt) + .Where(x => x.profileType.Trim().ToUpper().Contains(type.Trim().ToUpper())) + // .Where(x => rootId == "" ? true : (child1Id == "" ? x.rootOldId == rootId : (child2Id == "" ? x.child1OldId == child1Id : (child3Id == "" ? x.child2OldId == child2Id : (child4Id == "" ? x.child3OldId == child3Id : x.child4OldId == child4Id))))) + .Select(p => new + { + p.Id, + p.profileType, + p.citizenId, + p.profileId, + p.prefix, + p.firstName, + p.lastName, + p.rootOld, + p.rootOldId, + p.rootShortNameOld, + p.child1Old, + p.child1OldId, + p.child1ShortNameOld, + p.child2Old, + p.child2OldId, + p.child2ShortNameOld, + p.child3Old, + p.child3OldId, + p.child3ShortNameOld, + p.child4Old, + p.child4OldId, + p.child4ShortNameOld, + p.PositionOld, + p.PositionExecutiveOld, + p.posMasterNoOld, + p.posTypeOldId, + p.posTypeNameOld, + p.posLevelOldId, + p.posLevelNameOld, + p.CreatedAt, + p.Organization, + p.Reason, + p.Status, + p.Date, + salary = p.AmountOld, + p.PositionTypeOld, + p.PositionLevelOld, + p.PositionNumberOld, + p.OrganizationPositionOld, + p.IsActive, + }) + .ToListAsync(); + //if (status != null && status.Trim().ToUpper() != "WAITTING") + if (status != null) + retirementOuts = retirementOuts.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); + return Success(retirementOuts); } - if (role == "OWNER" || role == "CHILD") - { - retirementOuts = retirementOuts - .Where(x => node == 4 ? x.child4DnaOldId == nodeId : (node == 3 ? x.child3DnaOldId == nodeId : (node == 2 ? x.child2DnaOldId == nodeId : (node == 1 ? x.child1DnaOldId == nodeId : (node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - retirementOuts = retirementOuts - .Where(x => node == 4 ? x.child3DnaOldId == nodeId : (node == 3 ? x.child2DnaOldId == nodeId : (node == 2 ? x.child1DnaOldId == nodeId : (node == 1 || node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - retirementOuts = retirementOuts - .Where(x => x.rootDnaOldId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // retirementOuts = retirementOuts - // .Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList(); - // } - else if (role == "NORMAL") - { - retirementOuts = retirementOuts.Where(x => - node == 0 ? x.rootDnaOldId == nodeId && x.child1DnaOldId == null : - node == 1 ? x.child1DnaOldId == nodeId && x.child2DnaOldId == null : - node == 2 ? x.child2DnaOldId == nodeId && x.child3DnaOldId == null : - node == 3 ? x.child3DnaOldId == nodeId && x.child4DnaOldId == null : - node == 4 ? x.child4DnaOldId == nodeId : - true - ).ToList(); - } - return Success(retirementOuts); } /// @@ -239,6 +168,16 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpGet("{id:length(36)}")] public async Task> GetDetailAdmin(Guid id) { + var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "SYS_DISMISS"); + if (getWorkflow == false) + { + var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_DISMISS"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") + { + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); + } + } var data = await _context.RetirementOuts.AsQueryable() .Where(x => x.Id == id) .Select(p => new @@ -284,20 +223,6 @@ namespace BMA.EHR.Retirement.Service.Controllers p.OrganizationOld, }) .FirstOrDefaultAsync(); - - string _system = data != null && data.profileType?.Trim().ToUpper() == "OFFICER" ? "SYS_DISMISS" : "SYS_DISMISS_EMP"; - - var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), _system); - if (getWorkflow == false) - { - var getPermission = await _permission.GetPermissionAPIAsync("GET", _system); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - } - if (data == null) return Error(GlobalMessages.DataNotFound, 404); @@ -332,7 +257,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -375,19 +300,15 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementOut.PositionOld = org.result.position; retirementOut.PositionExecutiveOld = org.result.posExecutiveName; - retirementOut.positionExecutiveFieldOld = org.result.positionExecutiveField; - retirementOut.positionAreaOld = org.result.positionArea; retirementOut.PositionLevelOld = org.result.posLevelName; retirementOut.PositionTypeOld = org.result.posTypeName; - retirementOut.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; + retirementOut.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; retirementOut.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + (org.result.child1 == null ? "" : org.result.child1 + "\n") + (org.result.root == null ? "" : org.result.root); - retirementOut.OrganizationPositionOld = org.result.position + "\n" + - (retirementOut.PositionExecutiveOld == null ? "" : (retirementOut.positionExecutiveField == null ? retirementOut.PositionExecutiveOld + "\n" : retirementOut.PositionExecutiveOld + "(" + retirementOut.positionExecutiveField + ")" + "\n")) - + retirementOut.OrganizationOld; + retirementOut.OrganizationPositionOld = org.result.position + "\n" + (retirementOut.PositionExecutiveOld == null ? "" : retirementOut.PositionExecutiveOld + "\n") + retirementOut.OrganizationOld; retirementOut.AmountOld = org.result.salary; } } @@ -397,11 +318,13 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); + var org = JsonConvert.DeserializeObject(_result); + if (org == null || org.result == null) return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); @@ -412,23 +335,18 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementOut.citizenId = org.result.citizenId; retirementOut.rootOld = org.result.root; retirementOut.rootOldId = org.result.rootId; - retirementOut.rootDnaOldId = org.result.rootDnaId; retirementOut.rootShortNameOld = org.result.rootShortName; retirementOut.child1Old = org.result.child1; retirementOut.child1OldId = org.result.child1Id; - retirementOut.child1DnaOldId = org.result.child1DnaId; retirementOut.child1ShortNameOld = org.result.child1ShortName; retirementOut.child2Old = org.result.child2; retirementOut.child2OldId = org.result.child2Id; - retirementOut.child2DnaOldId = org.result.child2DnaId; retirementOut.child2ShortNameOld = org.result.child2ShortName; retirementOut.child3Old = org.result.child3; retirementOut.child3OldId = org.result.child3Id; - retirementOut.child3DnaOldId = org.result.child3DnaId; retirementOut.child3ShortNameOld = org.result.child3ShortName; retirementOut.child4Old = org.result.child4; retirementOut.child4OldId = org.result.child4Id; - retirementOut.child4DnaOldId = org.result.child4DnaId; retirementOut.child4ShortNameOld = org.result.child4ShortName; retirementOut.posMasterNoOld = org.result.posMasterNo; retirementOut.posTypeOldId = org.result.posTypeId; @@ -439,7 +357,7 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementOut.PositionOld = org.result.position; retirementOut.PositionLevelOld = org.result.posLevelName; retirementOut.PositionTypeOld = org.result.posTypeName; - retirementOut.PositionNumberOld = org.result.nodeShortName + " " + org.result.posMasterNo; + retirementOut.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; retirementOut.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + @@ -466,18 +384,14 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpPut("{id:length(36)}")] public async Task> Put([FromBody] RetirementOutEditRequest req, Guid id) { - var uppdated = await _context.RetirementOuts - .FirstOrDefaultAsync(x => x.Id == id); - - string _system = uppdated != null && uppdated.profileType?.Trim().ToUpper() == "OFFICER" ? "SYS_DISMISS" : "SYS_DISMISS_EMP"; - - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", _system); + var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_DISMISS"); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - + var uppdated = await _context.RetirementOuts + .FirstOrDefaultAsync(x => x.Id == id); if (uppdated == null) return Error(GlobalMessages.RetirementOutNotFound, 404); @@ -535,18 +449,14 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpDelete("{id:length(36)}")] public async Task> Delete(Guid id) { - var deleted = await _context.RetirementOuts.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == id); - - string _system = deleted != null && deleted.profileType?.Trim().ToUpper() == "OFFICER" ? "SYS_DISMISS" : "SYS_DISMISS_EMP"; - - var getPermission = await _permission.GetPermissionAPIAsync("DELETE", _system); + var getPermission = await _permission.GetPermissionAPIAsync("DELETE", "SYS_DISMISS"); var jsonData = JsonConvert.DeserializeObject(getPermission); if (jsonData["status"]?.ToString() != "200") { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - + var deleted = await _context.RetirementOuts.AsQueryable() + .FirstOrDefaultAsync(x => x.Id == id); if (deleted == null) return NotFound(); _context.RetirementOuts.Remove(deleted); @@ -600,7 +510,7 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpPost("command/report")] public async Task> PostReport([FromBody] ReportPersonRequest req) { - var placementProfiles = await _context.RetirementOuts + var placementProfiles = await _context.RetirementResigns .Where(x => req.refIds.Contains(x.Id.ToString())) .ToListAsync(); placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); @@ -619,7 +529,7 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpPost("command/report/delete")] public async Task> PostDeleteReport([FromBody] ReportPersonRequest req) { - var placementProfiles = await _context.RetirementOuts + var placementProfiles = await _context.RetirementResigns .Where(x => req.refIds.Contains(x.Id.ToString())) // .Where(x => x.Status.ToUpper() == "REPORT") .ToListAsync(); @@ -629,7 +539,7 @@ namespace BMA.EHR.Retirement.Service.Controllers } /// - /// ออกคำสั่ง C-PM-18 ให้ออกจากราชการ && C-PM-43 ให้ลูกจ้างออกจากราชการ + /// ออกคำสั่ง C-PM-18 คำสั่งให้ออกจากราชการ /// /// /// @@ -652,9 +562,7 @@ namespace BMA.EHR.Retirement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutiveOld, - positionExecutiveField = p.positionExecutiveFieldOld, - positionArea = p.positionAreaOld, + positionExecutive = "", positionType = p.PositionTypeOld, positionLevel = p.PositionLevelOld, isLeave = true, @@ -681,49 +589,33 @@ namespace BMA.EHR.Retirement.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - resignId = p.Id, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; - // if (data.Count > 0) - // { - // if (data[0].profileType == "EMPLOYEE") - // { - // apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave"; - // } - // } - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // // // var _result = await _res.Content.ReadAsStringAsync(); - // // // if (_res.IsSuccessStatusCode) - // // // { - // // // data.ForEach(profile => profile.Status = "DONE"); - // // // await _context.SaveChangesAsync(); - // // // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; + if (data.Count > 0) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + if (data[0].profileType == "EMPLOYEE") + { + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave"; + } + } + using (var client = new HttpClient()) + { + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } } } diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs index 019451c5..992b3e85 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs @@ -2,7 +2,6 @@ using BMA.EHR.Application.Repositories.MessageQueue; using BMA.EHR.Application.Repositories.Reports; using BMA.EHR.Application.Repositories.Reports; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Models.Retirement; @@ -35,7 +34,6 @@ namespace BMA.EHR.Retirement.Service.Controllers private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; private readonly PermissionRepository _permission; - private readonly UserProfileRepository _userProfileRepository; private readonly RetireReportRepository _service; public RetirementResignController(RetirementRepository repository, @@ -45,7 +43,6 @@ namespace BMA.EHR.Retirement.Service.Controllers IHttpContextAccessor httpContextAccessor, IConfiguration configuration, PermissionRepository permission, - UserProfileRepository userProfileRepository, RetireReportRepository service) { _repository = repository; @@ -55,7 +52,6 @@ namespace BMA.EHR.Retirement.Service.Controllers _httpContextAccessor = httpContextAccessor; _configuration = configuration; _permission = permission; - _userProfileRepository = userProfileRepository; _service = service; } @@ -65,7 +61,6 @@ namespace BMA.EHR.Retirement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion // private List GetOcNameFullPath(Guid id, bool showRoot = false) @@ -135,12 +130,11 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpGet("user")] public async Task> GetListByProfile() { - // var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; - var apiUrl = $"{_configuration["API"]}/org/dotnet/get-profileId"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -151,7 +145,7 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); var retirementResigns = await _context.RetirementResigns.AsQueryable() - .Where(x => x.Status != "DELETE" && x.profileId == org.result.profileId) + .Where(x => x.profileId == org.result.profileId) .OrderByDescending(x => x.CreatedAt) .Select(p => new { @@ -165,7 +159,7 @@ namespace BMA.EHR.Retirement.Service.Controllers p.ApproveReason, p.RejectReason, p.CancelReason, - status = p.RetirementResignCancels.FirstOrDefault() == null ? p.Status : p.RetirementResignCancels.FirstOrDefault().Status, + p.Status, statusCancel = p.RetirementResignCancels.FirstOrDefault() == null ? null : p.RetirementResignCancels.FirstOrDefault().Status, p.IsActive, }) @@ -186,12 +180,11 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpGet("user-cancel")] public async Task> GetListByProfileCancel() { - // var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; - var apiUrl = $"{_configuration["API"]}/org/dotnet/get-profileId"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -241,44 +234,8 @@ namespace BMA.EHR.Retirement.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; var retirementResigns = await _context.RetirementResigns.AsQueryable() - .Where(x => type.Trim().ToUpper() == "APPROVE" ? (x.Status == "APPROVE" || x.Status == "REJECT") : x.Status == type.Trim().ToUpper()) + .Where(x => x.Status == type.Trim().ToUpper()) .OrderByDescending(x => x.CreatedAt) .Select(p => new { @@ -307,52 +264,9 @@ namespace BMA.EHR.Retirement.Service.Controllers p.CancelReason, p.IsActive, p.CreatedAt, - p.ApproveStep, - p.Group, - p.rootDnaOldId, - p.child1DnaOldId, - p.child2DnaOldId, - p.child3DnaOldId, - p.child4DnaOldId, }) .ToListAsync(); - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - retirementResigns = retirementResigns - .Where(x => node == 4 ? x.child4DnaOldId == nodeId : (node == 3 ? x.child3DnaOldId == nodeId : (node == 2 ? x.child2DnaOldId == nodeId : (node == 1 ? x.child1DnaOldId == nodeId : (node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - retirementResigns = retirementResigns - .Where(x => node == 4 ? x.child3DnaOldId == nodeId : (node == 3 ? x.child2DnaOldId == nodeId : (node == 2 ? x.child1DnaOldId == nodeId : (node == 1 || node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - retirementResigns = retirementResigns - .Where(x => x.rootDnaOldId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // retirementResigns = retirementResigns - // .Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList(); - // } - else if (role == "NORMAL") - { - retirementResigns = retirementResigns.Where(x => - node == 0 ? x.rootDnaOldId == nodeId && x.child1DnaOldId == null : - node == 1 ? x.child1DnaOldId == nodeId && x.child2DnaOldId == null : - node == 2 ? x.child2DnaOldId == nodeId && x.child3DnaOldId == null : - node == 3 ? x.child3DnaOldId == nodeId && x.child4DnaOldId == null : - node == 4 ? x.child4DnaOldId == nodeId : - true - ).ToList(); - } - return Success(retirementResigns); } @@ -373,44 +287,8 @@ namespace BMA.EHR.Retirement.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; var retirementResigns = await _context.RetirementResignCancels.AsQueryable() - .Where(x => type.Trim().ToUpper() == "APPROVE" ? (x.Status == "APPROVE" || x.Status == "REJECT") : x.Status == type.Trim().ToUpper()) + .Where(x => x.Status == type.Trim().ToUpper()) .OrderByDescending(x => x.CreatedAt) .Select(p => new { @@ -438,52 +316,9 @@ namespace BMA.EHR.Retirement.Service.Controllers p.CancelReason, p.IsActive, p.CreatedAt, - p.ApproveStep, - p.Group, - p.rootDnaOldId, - p.child1DnaOldId, - p.child2DnaOldId, - p.child3DnaOldId, - p.child4DnaOldId, }) .ToListAsync(); - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - retirementResigns = retirementResigns - .Where(x => node == 4 ? x.child4DnaOldId == nodeId : (node == 3 ? x.child3DnaOldId == nodeId : (node == 2 ? x.child2DnaOldId == nodeId : (node == 1 ? x.child1DnaOldId == nodeId : (node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - retirementResigns = retirementResigns - .Where(x => node == 4 ? x.child3DnaOldId == nodeId : (node == 3 ? x.child2DnaOldId == nodeId : (node == 2 ? x.child1DnaOldId == nodeId : (node == 1 || node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - retirementResigns = retirementResigns - .Where(x => x.rootDnaOldId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // retirementResigns = retirementResigns - // .Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList(); - // } - else if (role == "NORMAL") - { - retirementResigns = retirementResigns.Where(x => - node == 0 ? x.rootDnaOldId == nodeId && x.child1DnaOldId == null : - node == 1 ? x.child1DnaOldId == nodeId && x.child2DnaOldId == null : - node == 2 ? x.child2DnaOldId == nodeId && x.child3DnaOldId == null : - node == 3 ? x.child3DnaOldId == nodeId && x.child4DnaOldId == null : - node == 4 ? x.child4DnaOldId == nodeId : - true - ).ToList(); - } - return Success(retirementResigns); } @@ -508,192 +343,23 @@ namespace BMA.EHR.Retirement.Service.Controllers .FirstOrDefaultAsync(); if (dataMain == null) return Error(GlobalMessages.RetirementResignNotFound, 404); - // if (dataMain.IsCancel != true) - // { - var data = await _context.RetirementResigns.AsQueryable() - .Where(x => x.Id == id) - .Select(p => new - { - p.Id, - p.prefix, - p.firstName, - p.lastName, - p.profileId, - p.Location, - p.SendDate, - p.ActiveDate, - p.Reason, - p.ReasonResign, - p.Remark, - p.Status, - salary = p.AmountOld, - p.ApproveReason, - p.RejectReason, - p.IsActive, - p.CreatedAt, - p.PositionTypeOld, - p.PositionLevelOld, - p.PositionNumberOld, - p.OrganizationPositionOld, - p.OligarchReject, - p.OligarchApproveReason, - p.OligarchRejectReason, - p.OligarchRejectDate, - p.CommanderReject, - p.CommanderApproveReason, - p.CommanderRejectReason, - p.CommanderRejectDate, - p.OfficerReject, - p.OfficerApproveReason, - p.OfficerRejectReason, - p.OfficerRejectDate, - p.RemarkHorizontal, - p.rootOld, - p.rootOldId, - p.rootShortNameOld, - p.child1Old, - p.child1OldId, - p.child1ShortNameOld, - p.child2Old, - p.child2OldId, - p.child2ShortNameOld, - p.child3Old, - p.child3OldId, - p.child3ShortNameOld, - p.child4Old, - p.child4OldId, - p.child4ShortNameOld, - p.PositionOld, - p.posMasterNoOld, - p.posTypeOldId, - p.posTypeNameOld, - p.posLevelOldId, - p.posLevelNameOld, - p.IsNoDebt, - p.IsNoBurden, - p.IsDiscipline, - p.CancelReason, - p.ApproveStep, - p.Group, - Approvers = p.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"), - Commanders = p.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"), - KeycloakUserId = p.CreatedUserId, - RetirementResignCancels = p.RetirementResignCancels.FirstOrDefault(), - RetirementResignDocs = p.RetirementResignDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), - }) - .FirstOrDefaultAsync(); - if (data == null) - return Error(GlobalMessages.RetirementResignNotFound, 404); - var retirementResignDocs = new List(); - foreach (var doc in data.RetirementResignDocs) - { - var _doc = new - { - FileName = doc.FileName, - PathName = await _documentService.ImagesPath(doc.Id), - doc.Id, - }; - retirementResignDocs.Add(_doc); - } - var _data = new - { - data.Id, - data.profileId, - data.prefix, - data.firstName, - data.lastName, - data.Location, - data.SendDate, - data.ActiveDate, - data.Reason, - data.ReasonResign, - data.Remark, - data.Status, - data.salary, - data.PositionTypeOld, - data.PositionLevelOld, - data.PositionNumberOld, - data.OrganizationPositionOld, - data.ApproveReason, - data.RejectReason, - data.IsActive, - data.CreatedAt, - data.OligarchReject, - data.OligarchApproveReason, - data.OligarchRejectReason, - data.OligarchRejectDate, - data.CommanderReject, - data.CommanderApproveReason, - data.CommanderRejectReason, - data.CommanderRejectDate, - data.OfficerReject, - data.OfficerApproveReason, - data.OfficerRejectReason, - data.OfficerRejectDate, - data.RemarkHorizontal, - data.rootOld, - data.rootOldId, - data.rootShortNameOld, - data.child1Old, - data.child1OldId, - data.child1ShortNameOld, - data.child2Old, - data.child2OldId, - data.child2ShortNameOld, - data.child3Old, - data.child3OldId, - data.child3ShortNameOld, - data.child4Old, - data.child4OldId, - data.child4ShortNameOld, - data.PositionOld, - data.posMasterNoOld, - data.posTypeOldId, - data.posTypeNameOld, - data.posLevelOldId, - data.posLevelNameOld, - data.IsNoDebt, - data.IsNoBurden, - data.IsDiscipline, - data.CancelReason, - data.KeycloakUserId, - data.Approvers, - data.Commanders, - data.ApproveStep, - data.Group, - idCancel = data.RetirementResignCancels?.Id ?? null, - statusCancel = data.RetirementResignCancels?.Status ?? null, - statusMain = data.Status == "CANCEL" ? "DONECANCEL" : data.Status, - Docs = retirementResignDocs, - }; - - return Success(_data); - } - - /// - /// get รายละเอียดลาออก - /// - /// Id ลาออก - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("user/{id:length(36)}")] - public async Task> GetDetailByUsers(Guid id) - { - var dataMain = await _context.RetirementResigns.AsQueryable() - .Where(x => x.Id == id) - .Select(p => new - { - p.IsCancel, - }) - .FirstOrDefaultAsync(); - if (dataMain == null) - return Error(GlobalMessages.RetirementResignNotFound, 404); if (dataMain.IsCancel != true) { + var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "SYS_RESIGN"); + var createdUserId = await _context.RetirementResigns.AsQueryable() + .Where(x => x.Id == id) + .Where(x => x.CreatedUserId == UserId) + .FirstOrDefaultAsync(); + if (getWorkflow == false && createdUserId == null) + { + var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_RESIGN"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") + { + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); + } + } var data = await _context.RetirementResigns.AsQueryable() .Where(x => x.Id == id) .Select(p => new @@ -757,13 +423,6 @@ namespace BMA.EHR.Retirement.Service.Controllers p.IsNoBurden, p.IsDiscipline, p.CancelReason, - p.ApproveStep, - p.Group, - Approvers = p.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"), - Commanders = p.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"), - CancelApprovers = new List(), - CancelCommanders = new List(), - KeycloakUserId = p.CreatedUserId, RetirementResignCancels = p.RetirementResignCancels.FirstOrDefault(), RetirementResignDocs = p.RetirementResignDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), }) @@ -843,13 +502,6 @@ namespace BMA.EHR.Retirement.Service.Controllers data.IsNoBurden, data.IsDiscipline, data.CancelReason, - data.KeycloakUserId, - data.Approvers, - data.Commanders, - data.ApproveStep, - data.CancelApprovers, - data.CancelCommanders, - data.Group, idCancel = data.RetirementResignCancels?.Id ?? null, statusCancel = data.RetirementResignCancels?.Status ?? null, statusMain = data.Status == "CANCEL" ? "DONECANCEL" : data.Status, @@ -860,6 +512,20 @@ namespace BMA.EHR.Retirement.Service.Controllers } else { + var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "RETIREMENT_CANCEL"); + var createdUserId = await _context.RetirementResignCancels.AsQueryable() + .Where(x => x.CreatedUserId == UserId) + .Where(x => x.Id == id) + .FirstOrDefaultAsync(); + if (getWorkflow == false && createdUserId == null) + { + var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_RESIGN"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") + { + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); + } + } var data = await _context.RetirementResignCancels.AsQueryable() .Where(x => x.RetirementResign.Id == id) .Select(p => new @@ -922,13 +588,6 @@ namespace BMA.EHR.Retirement.Service.Controllers p.IsNoBurden, p.IsDiscipline, p.CancelReason, - p.ApproveStep, - p.Group, - Approvers = p.RetirementResign.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"), - Commanders = p.RetirementResign.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"), - CancelApprovers = p.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"), - CancelCommanders = p.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"), - KeycloakUserId = p.CreatedUserId, idMain = p.RetirementResign.Id, statusMain = p.RetirementResign.Status, RetirementResignDocs = p.RetirementResign.RetirementResignDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), @@ -1011,13 +670,6 @@ namespace BMA.EHR.Retirement.Service.Controllers data.CancelReason, data.idMain, data.statusMain, - data.KeycloakUserId, - data.ApproveStep, - data.Group, - data.Approvers, - data.Commanders, - data.CancelApprovers, - data.CancelCommanders, statusCancel = data.Status, Docs = retirementResignDocs, }; @@ -1037,6 +689,19 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpGet("cancel/{id:length(36)}")] public async Task> GetDetailByUserCancel(Guid id) { + var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "RETIREMENT_CANCEL"); + var createdUserId = await _context.RetirementResignCancels.AsQueryable() + .Where(x => x.CreatedUserId == UserId) + .FirstOrDefaultAsync(); + if (getWorkflow == false && createdUserId == null) + { + var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_RESIGN"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") + { + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); + } + } var data = await _context.RetirementResignCancels.AsQueryable() .Where(x => x.Id == id) .Select(p => new @@ -1099,11 +764,6 @@ namespace BMA.EHR.Retirement.Service.Controllers p.IsNoBurden, p.IsDiscipline, p.CancelReason, - p.ApproveStep, - p.Group, - Approvers = p.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"), - Commanders = p.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"), - KeycloakUserId = p.CreatedUserId, idMain = p.RetirementResign.Id, statusMain = p.RetirementResign.Status, RetirementResignDocs = p.RetirementResign.RetirementResignDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), @@ -1186,11 +846,6 @@ namespace BMA.EHR.Retirement.Service.Controllers data.CancelReason, data.idMain, data.statusMain, - data.KeycloakUserId, - data.ApproveStep, - data.Group, - data.Approvers, - data.Commanders, Docs = retirementResignDocs, }; return Success(_data); @@ -1222,7 +877,6 @@ namespace BMA.EHR.Retirement.Service.Controllers var retirementResign = new RetirementResign { - ApproveStep = "st1", Location = req.Location, SendDate = DateTime.Now, ActiveDate = req.ActiveDate, @@ -1243,7 +897,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -1286,32 +940,15 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementResign.AmountOld = org.result.salary; retirementResign.PositionOld = org.result.position; retirementResign.PositionExecutiveOld = org.result.posExecutiveName; - retirementResign.positionExecutiveFieldOld = org.result.positionExecutiveField; - retirementResign.positionAreaOld = org.result.positionArea; retirementResign.PositionLevelOld = org.result.posLevelName; retirementResign.PositionTypeOld = org.result.posTypeName; - retirementResign.PositionNumberOld = org.result.posNo; + retirementResign.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; retirementResign.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + (org.result.child1 == null ? "" : org.result.child1 + "\n") + (org.result.root == null ? "" : org.result.root); - retirementResign.OrganizationPositionOld = org.result.position + "\n" + - (retirementResign.PositionExecutiveOld == null ? "" : (retirementResign.positionExecutiveField == null ? retirementResign.PositionExecutiveOld + "\n" : retirementResign.PositionExecutiveOld + "(" + retirementResign.positionExecutiveField + ")" + "\n")) - + retirementResign.OrganizationOld; - - if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "ชำนาญงาน") || (retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "ปฏิบัติงาน") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ปฏิบัติการ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ชำนาญการ")) - { - retirementResign.Group = "1.1"; - } - else if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "อาวุโส") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ชำนาญการพิเศษ") || (retirementResign.posTypeNameOld == "อำนวยการ" && retirementResign.posLevelNameOld == "ต้น")) - { - retirementResign.Group = "1.2"; - } - else if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "ทักษะพิเศษ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "เชี่ยวชาญ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ทรงคุณวุฒิ") || (retirementResign.posTypeNameOld == "อำนวยการ" && retirementResign.posLevelNameOld == "สูง") || (retirementResign.posTypeNameOld == "บริหาร" && retirementResign.posLevelNameOld == "ต้น") || (retirementResign.posTypeNameOld == "บริหาร" && retirementResign.posLevelNameOld == "สูง")) - { - retirementResign.Group = "2"; - } + retirementResign.OrganizationPositionOld = org.result.position + "\n" + (retirementResign.PositionExecutiveOld == null ? "" : retirementResign.PositionExecutiveOld + "\n") + retirementResign.OrganizationOld; } await _context.RetirementResigns.AddAsync(retirementResign); await _context.SaveChangesAsync(); @@ -1342,157 +979,18 @@ namespace BMA.EHR.Retirement.Service.Controllers } } await _context.SaveChangesAsync(); - return Success(retirementResign); - } - - /// - /// สร้างการลาออก โดย admin - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("admin")] - public async Task> PostAdmin([FromForm] RetirementResignAdminRequest req) - { - var Remark = req.Remark; - if (req.Reason != null) - { - switch (req.Reason.Trim().ToUpper()) - { - case "CAREER": Remark = $"ประกอบอาชีพอื่น" + (req.Remark == null || req.Remark == "" ? $"{req.Remark}" : ""); break; - case "MOVE": Remark = $"รับราชการสังกัดอื่น" + (req.Remark == null || req.Remark == "" ? $"{req.Remark}" : ""); break; - case "FAMILY": Remark = $"ดูแลบิดามารดา" + (req.Remark == null || req.Remark == "" ? $"{req.Remark}" : ""); break; - case "EDUCATION": Remark = $"ศึกษาต่อ" + (req.Remark == null || req.Remark == "" ? $"{req.Remark}" : ""); break; - case "OTHER": Remark = $"อื่น ๆ" + (req.Remark == null || req.Remark == "" ? $"{req.Remark}" : ""); break; - } - } - - var retirementResign = new RetirementResign - { - ApproveStep = "st1", - Location = req.Location, - SendDate = DateTime.Now, - ActiveDate = req.ActiveDate, - Reason = req.Reason, - ReasonResign = Remark, - Remark = req.Remark, - Status = "APPROVE", - IsActive = true, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }; - - var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.ProfileId}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); - var _res = await client.SendAsync(_req); - var _result = await _res.Content.ReadAsStringAsync(); - - var org = JsonConvert.DeserializeObject(_result); - - if (org == null || org.result == null) - return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); - - retirementResign.profileId = org.result.profileId; - retirementResign.prefix = org.result.prefix; - retirementResign.firstName = org.result.firstName; - retirementResign.lastName = org.result.lastName; - retirementResign.citizenId = org.result.citizenId; - retirementResign.rootOld = org.result.root; - retirementResign.rootOldId = org.result.rootId; - retirementResign.rootDnaOldId = org.result.rootDnaId; - retirementResign.rootShortNameOld = org.result.rootShortName; - retirementResign.child1Old = org.result.child1; - retirementResign.child1OldId = org.result.child1Id; - retirementResign.child1DnaOldId = org.result.child1DnaId; - retirementResign.child1ShortNameOld = org.result.child1ShortName; - retirementResign.child2Old = org.result.child2; - retirementResign.child2OldId = org.result.child2Id; - retirementResign.child2DnaOldId = org.result.child2DnaId; - retirementResign.child2ShortNameOld = org.result.child2ShortName; - retirementResign.child3Old = org.result.child3; - retirementResign.child3OldId = org.result.child3Id; - retirementResign.child3DnaOldId = org.result.child3DnaId; - retirementResign.child3ShortNameOld = org.result.child3ShortName; - retirementResign.child4Old = org.result.child4; - retirementResign.child4OldId = org.result.child4Id; - retirementResign.child4DnaOldId = org.result.child4DnaId; - retirementResign.child4ShortNameOld = org.result.child4ShortName; - retirementResign.posMasterNoOld = org.result.posMasterNo; - retirementResign.posTypeOldId = org.result.posTypeId; - retirementResign.posTypeNameOld = org.result.posTypeName; - retirementResign.posLevelOldId = org.result.posLevelId; - retirementResign.posLevelNameOld = org.result.posLevelName; - retirementResign.AmountOld = org.result.salary; - retirementResign.PositionOld = org.result.position; - retirementResign.PositionExecutiveOld = org.result.posExecutiveName; - retirementResign.positionExecutiveFieldOld = org.result.positionExecutiveField; - retirementResign.positionAreaOld = org.result.positionArea; - retirementResign.PositionLevelOld = org.result.posLevelName; - retirementResign.PositionTypeOld = org.result.posTypeName; - retirementResign.PositionNumberOld = org.result.posNo; - retirementResign.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + - (org.result.child3 == null ? "" : org.result.child3 + "\n") + - (org.result.child2 == null ? "" : org.result.child2 + "\n") + - (org.result.child1 == null ? "" : org.result.child1 + "\n") + - (org.result.root == null ? "" : org.result.root); - retirementResign.OrganizationPositionOld = org.result.position + "\n" + - (retirementResign.PositionExecutiveOld == null ? "" : (retirementResign.positionExecutiveField == null ? retirementResign.PositionExecutiveOld + "\n" : retirementResign.PositionExecutiveOld + "(" + retirementResign.positionExecutiveField + ")" + "\n")) - + retirementResign.OrganizationOld; - - if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "ชำนาญงาน") || (retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "ปฏิบัติงาน") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ปฏิบัติการ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ชำนาญการ")) + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync($"{_configuration["API"]}/org/workflow/add-workflow", new { - retirementResign.Group = "1.1"; - } - else if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "อาวุโส") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ชำนาญการพิเศษ") || (retirementResign.posTypeNameOld == "อำนวยการ" && retirementResign.posLevelNameOld == "ต้น")) - { - retirementResign.Group = "1.2"; - retirementResign.ApproveStep = "st3"; - } - else if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "ทักษะพิเศษ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "เชี่ยวชาญ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ทรงคุณวุฒิ") || (retirementResign.posTypeNameOld == "อำนวยการ" && retirementResign.posLevelNameOld == "สูง") || (retirementResign.posTypeNameOld == "บริหาร" && retirementResign.posLevelNameOld == "ต้น") || (retirementResign.posTypeNameOld == "บริหาร" && retirementResign.posLevelNameOld == "สูง")) - { - retirementResign.Group = "2"; - retirementResign.ApproveStep = "st3"; - } + refId = retirementResign.Id, + sysName = "SYS_RESIGN", + posLevelName = retirementResign.PositionLevelOld, + posTypeName = retirementResign.PositionTypeOld, + }); } - await _context.RetirementResigns.AddAsync(retirementResign); - await _context.SaveChangesAsync(); - if (Request.Form.Files != null && Request.Form.Files.Count != 0) - { - foreach (var file in Request.Form.Files) - { - var fileExtension = Path.GetExtension(file.FileName); - - var doc = await _documentService.UploadFileAsync(file, file.FileName); - var _doc = await _context.Documents.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == doc.Id); - if (_doc != null) - { - var retirementResignDoc = new RetirementResignDoc - { - RetirementResign = retirementResign, - Document = _doc, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }; - await _context.RetirementResignDocs.AddAsync(retirementResignDoc); - } - } - } - await _context.SaveChangesAsync(); return Success(retirementResign); } @@ -1513,10 +1011,7 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error(GlobalMessages.RetirementResignNotFound, 404); updated.Location = req.Location; - if (req.SendDate != null) - { - updated.SendDate = req.SendDate; - } + updated.ActiveDate = req.ActiveDate; // updated.Reason = req.Reason; updated.Remark = req.Remark; updated.ReasonResign = req.Reason; @@ -1660,7 +1155,6 @@ namespace BMA.EHR.Retirement.Service.Controllers public async Task> Cancel([FromBody] RetirementReasonRequest req, Guid id) { var updated = await _context.RetirementResigns.AsQueryable() - .Include(x => x.Approvers) .FirstOrDefaultAsync(x => x.Id == id); if (updated == null) return Error(GlobalMessages.RetirementResignNotFound, 404); @@ -1669,8 +1163,6 @@ namespace BMA.EHR.Retirement.Service.Controllers { var retirementResignCancel = new RetirementResignCancel { - ApproveStep = "st1", - Group = updated.Group, Location = updated.Location, SendDate = updated.SendDate, ActiveDate = updated.ActiveDate, @@ -1711,23 +1203,18 @@ namespace BMA.EHR.Retirement.Service.Controllers citizenId = updated.citizenId, rootOld = updated.rootOld, rootOldId = updated.rootOldId, - rootDnaOldId = updated.rootDnaOldId, rootShortNameOld = updated.rootShortNameOld, child1Old = updated.child1Old, child1OldId = updated.child1OldId, - child1DnaOldId = updated.child1DnaOldId, child1ShortNameOld = updated.child1ShortNameOld, child2Old = updated.child2Old, child2OldId = updated.child2OldId, - child2DnaOldId = updated.child2DnaOldId, child2ShortNameOld = updated.child2ShortNameOld, child3Old = updated.child3Old, child3OldId = updated.child3OldId, - child3DnaOldId = updated.child3DnaOldId, child3ShortNameOld = updated.child3ShortNameOld, child4Old = updated.child4Old, child4OldId = updated.child4OldId, - child4DnaOldId = updated.child4DnaOldId, child4ShortNameOld = updated.child4ShortNameOld, posMasterNoOld = updated.posMasterNoOld, posTypeOldId = updated.posTypeOldId, @@ -1745,44 +1232,32 @@ namespace BMA.EHR.Retirement.Service.Controllers }; await _context.RetirementResignCancels.AddAsync(retirementResignCancel); await _context.SaveChangesAsync(); - var addList = new List(); - - foreach (var r in updated.Approvers) + using (var client = new HttpClient()) { - addList.Add(new RetirementResignCancelApprover + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync($"{_configuration["API"]}/org/workflow/add-workflow", new { - Seq = r.Seq, - RetirementResignCancel = retirementResignCancel, - Prefix = r.Prefix, - FirstName = r.FirstName, - LastName = r.LastName, - PositionName = r.PositionName, - ProfileId = r.ProfileId, - KeycloakId = r.KeycloakId, - Org = r.Org, - ApproveStatus = "PENDING", - ApproveType = r.ApproveType + refId = retirementResignCancel.Id, + sysName = "RETIREMENT_CANCEL", + posLevelName = retirementResignCancel.PositionLevelOld, + posTypeName = retirementResignCancel.PositionTypeOld, }); } - await _context.AddRangeAsync(addList); - await _context.SaveChangesAsync(); updated.IsCancel = true; - updated.Status = "CANCELING"; } else if (updated.Status == "REPORT") { using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.DeleteAsync($"{_configuration["API"]}/org/command/tab2Cancel17/{updated.Id}"); + Console.WriteLine(_res); + Console.WriteLine($"{_configuration["API"]}/org/command/tab2Cancel17/{updated.Id}"); } - updated.Status = "CANCEL"; - } - else - { - updated.Status = "CANCEL"; } + updated.Status = "CANCEL"; updated.LastUpdateFullName = FullName ?? "System Administrator"; updated.LastUpdateUserId = UserId ?? ""; updated.LastUpdatedAt = DateTime.Now; @@ -1814,47 +1289,6 @@ namespace BMA.EHR.Retirement.Service.Controllers return Success(); } - /// - /// API ลบรายการลาออก (ADMIN) - /// - /// Id ลาออก - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/{id:length(36)}")] - public async Task> DeleteForAdminAsync(Guid id) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("DELETE", "SYS_RESIGN"); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - // ตรวจสอบว่า role ต้องเป็น OWNER เท่านั้น - if (jsonData.result.privilege != "OWNER") - { - return Error("ไม่มีสิทธิ์ในการลบรายการลาออก", StatusCodes.Status403Forbidden); - } - var deleted = await _context.RetirementResigns.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == id); - if (deleted == null) - return Error(GlobalMessages.RetirementResignNotFound, 404); - - // ห้ามลบเฉพาะสถานะ REPORT, WAITING, DONE, CANCELING, CANCEL - if (new[] { "REPORT", "WAITING", "DONE", "CANCELING", "CANCEL" }.Contains(deleted.Status)) - { - return Error("ไม่สามารถลบรายการลาออกสถานะนี้ได้"); - } - - deleted.Status = "DELETE"; - deleted.LastUpdateFullName = FullName ?? "System Administrator"; - deleted.LastUpdateUserId = UserId ?? ""; - deleted.LastUpdatedAt = DateTime.Now; - await _context.SaveChangesAsync(); - return Success(); - } - /// /// อนุมัติคำลาออก /// @@ -1984,6 +1418,7 @@ namespace BMA.EHR.Retirement.Service.Controllers if (updated == null) return Error(GlobalMessages.RetirementResignNotFound, 404); + // updated.Status = "APPROVE"; updated.CommanderReject = false; updated.CommanderApproveReason = req.Reason; updated.LastUpdateFullName = FullName ?? "System Administrator"; @@ -2186,42 +1621,6 @@ namespace BMA.EHR.Retirement.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; var data = await _context.RetirementQuestions.AsQueryable() .OrderByDescending(x => x.CreatedAt) .Select(p => new @@ -2247,49 +1646,8 @@ namespace BMA.EHR.Retirement.Service.Controllers LastUpdatedAt = p.LastUpdatedAt, CreatedAt = p.CreatedAt, AppointDate = p.AppointDate, - p.rootDnaId, - p.child1DnaId, - p.child2DnaId, - p.child3DnaId, - p.child4DnaId, }) .ToListAsync(); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - data = data - .Where(x => node == 4 ? x.child4DnaId == nodeId : (node == 3 ? x.child3DnaId == nodeId : (node == 2 ? x.child2DnaId == nodeId : (node == 1 ? x.child1DnaId == nodeId : (node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - data = data - .Where(x => node == 4 ? x.child3DnaId == nodeId : (node == 3 ? x.child2DnaId == nodeId : (node == 2 ? x.child1DnaId == nodeId : (node == 1 || node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - data = data - .Where(x => x.rootDnaId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // data = data - // .Where(x => x.rootDnaId == nodeId && x.child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - data = data.Where(x => - node == 0 ? x.rootDnaId == nodeId && x.child1DnaId == null : - node == 1 ? x.child1DnaId == nodeId && x.child2DnaId == null : - node == 2 ? x.child2DnaId == nodeId && x.child3DnaId == null : - node == 3 ? x.child3DnaId == nodeId && x.child4DnaId == null : - node == 4 ? x.child4DnaId == nodeId : - true - ).ToList(); - } return Success(data); } @@ -2412,37 +1770,6 @@ namespace BMA.EHR.Retirement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{retirementResign.profileId}"; - var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); - var _res = await client.SendAsync(_req); - var _result = await _res.Content.ReadAsStringAsync(); - - var org = JsonConvert.DeserializeObject(_result); - - if (org == null || org.result == null) - return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); - - period.root = org.result.root; - period.rootId = org.result.rootId; - period.rootDnaId = org.result.rootDnaId; - period.child1 = org.result.child1; - period.child1Id = org.result.child1Id; - period.child1DnaId = org.result.child1DnaId; - period.child2 = org.result.child2; - period.child2Id = org.result.child2Id; - period.child2DnaId = org.result.child2DnaId; - period.child3 = org.result.child3; - period.child3Id = org.result.child3Id; - period.child3DnaId = org.result.child3DnaId; - period.child4 = org.result.child4; - period.child4Id = org.result.child4Id; - period.child4DnaId = org.result.child4DnaId; - } await _context.RetirementQuestions.AddAsync(period); await _context.SaveChangesAsync(); @@ -2620,6 +1947,12 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpGet("questionnaire/question")] public async Task> GetQuestionnaireQuestion() { + //var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_RESIGN_INTERVIEW"); + //var jsonData = JsonConvert.DeserializeObject(getPermission); + //if (jsonData["status"]?.ToString() != "200") + //{ + // return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); + //} var retirementQuestionnaireQuestion = await _context.RetirementQuestionnaireQuestions.AsQueryable() .Select(x => new { @@ -2855,8 +2188,8 @@ namespace BMA.EHR.Retirement.Service.Controllers ActiveDate = p.ActiveDate == null ? "-" : p.ActiveDate.Value.ToThaiShortDate2().ToThaiNumber(), Salary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), Remark = p.Reason ?? "-", - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -2917,16 +2250,11 @@ namespace BMA.EHR.Retirement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutiveOld, - positionExecutiveField = p.positionExecutiveFieldOld, - positionArea = p.positionAreaOld, + positionExecutive = "", positionType = p.PositionTypeOld, positionLevel = p.PositionLevelOld, isLeave = p.IsCancel == true ? false : true, - //leaveReason = "ออกจากราชการ", - leaveReason = p.ReasonResign == "อื่น ๆ" - ? string.IsNullOrWhiteSpace(p.Remark) ? p.ReasonResign : $"{p.ReasonResign}({p.Remark})" - : p.ReasonResign, + leaveReason = "ออกจากราชการ", dateLeave = r.commandDateAffect, commandId = r.commandId, isGovernment = false, @@ -2951,238 +2279,24 @@ namespace BMA.EHR.Retirement.Service.Controllers remark = r.remark, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // // // var _result = await _res.Content.ReadAsStringAsync(); - // // // if (_res.IsSuccessStatusCode) - // // // { - // // // data.ForEach(profile => profile.Status = "DONE"); - // // // await _context.SaveChangesAsync(); - // // // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); - } - - /// - /// ส่งรายชื่อออกคำสั่ง C-PM-48 - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("command48/report")] - public async Task> PostReport48([FromBody] ReportPersonRequest req) - { - var resigns = await _context.RetirementResigns - .Where(x => req.refIds.Contains(x.Id.ToString())) - .ToListAsync(); - resigns.ForEach(profile => profile.Status = req.status.Trim().ToUpper()); - await _context.SaveChangesAsync(); - return Success(); - } - /// - /// ลบรายชื่อออกคำสั่ง C-PM-48 - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("command48/report/delete")] - public async Task> PostReportDelete48([FromBody] ReportPersonRequest req) - { - var resigns = await _context.RetirementResigns - .Where(x => req.refIds.Contains(x.Id.ToString())) - .Where(x => x.Status.ToUpper() == "REPORT") - .ToListAsync(); - resigns.ForEach(profile => profile.Status = "APPROVE"); - await _context.SaveChangesAsync(); - return Success(); - } - - /// - /// เอกสารแนบท้าย C-PM-48 - /// - /// Record Id ของคำสั่ง - /// pdf, docx หรือ xlsx - /// - /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("command48/report/attachment")] - [AllowAnonymous] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> PostReportAttachment48([FromBody] ReportAttachmentRequest req) - { - try - { - var report_data = (from p in _context.RetirementResigns - .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) - .ToList() - join r in req.refIds - on p.Id.ToString() equals r.refId - orderby r.Sequence - select new - { - No = r.Sequence.ToString().ToThaiNumber(), - CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(), - FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", - PositionName = p.PositionOld ?? "-", - Organization = p.OrganizationPositionOld ?? "-", - PositionLevel = p.PositionLevelOld ?? "-", - PositionType = p.PositionTypeOld ?? "-", - PositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), - ActiveDate = p.ActiveDate == null ? "-" : p.ActiveDate.Value.ToThaiShortDate2().ToThaiNumber(), - Salary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), - Remark = p.Reason ?? "-", - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() - }).ToList(); - - var result = new List(); - - foreach (var r in report_data) + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new { - result.Add(r); - string? _null = null; - if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") - { - result.Add(new - { - No = _null, - FullName = r.RemarkHorizontal, - CitizenId = _null, - PositionName = _null, - Organization = _null, - PositionLevel = _null, - PositionType = _null, - PositionNumber = _null, - ActiveDate = _null, - Salary = _null, - Remark = _null, - RemarkHorizontal = _null, - RemarkVertical = _null, - }); - } + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); } - return Success(result); } - catch - { - throw; - } - } - - /// - /// ออกคำสั่ง C-PM-48 คำสั่งอนุญาตให้ลาออกไปรับราชการทหาร - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("command48/report/excecute")] - public async Task> PostReportExecute48([FromBody] ReportExecuteRequest req) - { - var data = await _context.RetirementResigns - .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) - .ToListAsync(); - var resultData = (from p in data - join r in req.refIds - on p.Id.ToString() equals r.refId - select new - { - profileId = p.profileId, - amount = r.amount, - amountSpecial = r.amountSpecial, - positionSalaryAmount = r.positionSalaryAmount, - mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutiveOld, - positionExecutiveField = p.positionExecutiveFieldOld, - positionArea = p.positionAreaOld, - positionType = p.PositionTypeOld, - positionLevel = p.PositionLevelOld, - isLeave = p.IsCancel == true ? false : true, - leaveReason = p.ReasonResign == "อื่น ๆ" - ? string.IsNullOrWhiteSpace(p.Remark) ? p.ReasonResign : $"{p.ReasonResign}({p.Remark})" - : p.ReasonResign, - dateLeave = r.commandDateAffect, - commandId = r.commandId, - isGovernment = false, - orgRoot = p.rootOld, - orgChild1 = p.child1Old, - orgChild2 = p.child2Old, - orgChild3 = p.child3Old, - orgChild4 = p.child4Old, - commandNo = r.commandNo, - commandYear = r.commandYear, - posNo = p.posMasterNoOld?.ToString(), - posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" : - p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" : - p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" : - p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" : - p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "", - commandDateAffect = r.commandDateAffect, - commandDateSign = r.commandDateSign, - positionName = p.PositionOld, - commandCode = r.commandCode, - commandName = r.commandName, - remark = r.remark, - }).ToList(); - - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => - { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + return Success(); } /// @@ -3255,7 +2369,7 @@ namespace BMA.EHR.Retirement.Service.Controllers PositionName = p.PositionOld ?? "-", Organization = p.OrganizationPositionOld ?? "-", Oc = (p.PositionOld == null ? "" : $"{p.PositionOld}\n") + - (p.PositionExecutiveOld == null ? "" : (p.positionExecutiveFieldOld == null ? $"{p.PositionExecutiveOld}\n" : $"{p.PositionExecutiveOld}({p.positionExecutiveFieldOld})\n")) + + (p.PositionExecutiveOld == null ? "" : $"{p.PositionExecutiveOld}\n") + (p.child4Old == null ? "" : $"{p.child4Old}\n") + (p.child3Old == null ? "" : $"{p.child3Old}\n") + (p.child2Old == null ? "" : $"{p.child2Old}\n") + @@ -3266,9 +2380,9 @@ namespace BMA.EHR.Retirement.Service.Controllers PositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), ActiveDate = p.ActiveDate == null ? "-" : p.ActiveDate.Value.ToThaiShortDate2().ToThaiNumber(), Salary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), - Remark = p.Reason?.ToThaiNumber() ?? "-", - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + Remark = p.Reason ?? "-", + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -3331,9 +2445,7 @@ namespace BMA.EHR.Retirement.Service.Controllers amountSpecial = r.amountSpecial, positionSalaryAmount = r.positionSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount, - positionExecutive = p.PositionExecutiveOld, - positionExecutiveField = p.positionExecutiveFieldOld, - positionArea = p.positionAreaOld, + positionExecutive = "", positionType = p.PositionTypeOld, positionLevel = p.PositionLevelOld, isLeave = false, @@ -3360,72 +2472,30 @@ namespace BMA.EHR.Retirement.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - resignId = p.RetirementResign.Id, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - //var reportDone = false; - //if (data.Where(profile => profile.Status == "DONE").Any()) - //{ - // reportDone = true; - //} - //if (reportDone == true) - //{ - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // // // var _result = await _res.Content.ReadAsStringAsync(); - // // // if (_res.IsSuccessStatusCode) - // // // { - // // // data.ForEach(profile => profile.Status = "DONE"); - // // // data.ForEach(profile => profile.RetirementResign.Status = "CANCEL"); - // // // await _context.SaveChangesAsync(); - // // // } - // } - //} - //else - //{ - // var apiUrlOrg = $"{baseAPIOrg}/org/command/cancel-resign"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // resignId = resultData.Select(x => x.resignId).ToList(), - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.Status = "DONE"); - // data.ForEach(profile => profile.RetirementResign.Status = "CANCEL"); - // await _context.SaveChangesAsync(); - // } - // } - //} - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - data.ForEach(profile => profile.RetirementResign.Status = "CANCEL"); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + // var _data = await _context.RetirementResigns + // .Where(x => data.Select(x => x.RetirementResign.Id).Contains(x.Id)) + // .ToListAsync(); + // _data.ForEach(profile => profile.Status = "DONEREJECT"); + await _context.SaveChangesAsync(); + } + } + return Success(); } #region 33-แบบฟอร์มหนังสือขอลาออกจากราชการ @@ -3467,446 +2537,6 @@ namespace BMA.EHR.Retirement.Service.Controllers throw; } } - - /// - /// เพิ่มรายชิื่อผู้อนุมัติ หรือ ผู้บังคับบัญชา - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("officer/add-resign/{type}/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> AddApprover(string type, Guid id, [FromBody] List req) - { - try - { - var retirement = await _context.RetirementResigns - .Where(x => x.Id == id) - .FirstOrDefaultAsync(); - if (retirement == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var data = await _context.RetirementResignApprovers - .Where(x => x.RetirementResign.Id == id && x.ApproveType.ToUpper() == type.ToUpper()) - .ToListAsync(); - _context.RemoveRange(data); - - await _context.SaveChangesAsync(); - - var addList = new List(); - - foreach (var r in req) - { - addList.Add(new RetirementResignApprover - { - Seq = r.Seq, - RetirementResign = retirement, - Prefix = r.Prefix, - FirstName = r.FirstName, - LastName = r.LastName, - PositionName = r.PositionName, - PositionExecutiveName = r.PositionExecutiveName, - ProfileId = r.ProfileId, - KeycloakId = r.KeycloakId, - Org = r.Org, - ApproveStatus = "PENDING", - ApproveType = type.Trim().ToUpper() - }); - } - await _context.AddRangeAsync(addList); - await _context.SaveChangesAsync(); - - return Success(); - - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// LV2_013 - เจ้าหน้าที่อนุมัติการลา (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("admin/approve/officer/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> OfficerApproveRetirementResignAsync(Guid id) - { - await _repository.OfficerApproveRetirementResign(id); - - return Success(); - } - - /// - /// LV2_015 - ผู้บังคับบัญชาอนุมัติการลา(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/approve/comander/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CommanderApproveRetirementResignAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.CommanderApproveRetirementResign(id, req.Reason ?? "", null); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// ผู้บังคับบัญชาไม่อนุมัติการลา(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/reject/comander/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CommanderRejectRetirementResignAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.CommanderRejectRetirementResign(id, req.Reason ?? "", req.Date); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// LV2_016 - ผู้มีอำนาจอนุมัติการลา (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/approve/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> ApproveRetirementResignAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.ApproveRetirementResign(id, req.Reason ?? "", null); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// LV2_017 - ผู้มีอำนาจไม่อนุมัติการลา (ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/reject/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> RejectRetirementResignAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.RejectRetirementResign(id, req.Reason ?? "", req.Date); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - - - - /// - /// เพิ่มรายชิื่อผู้อนุมัติ หรือ ผู้บังคับบัญชา ยกเลิก - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("officer-cancel/add-resign/{type}/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> AddApproverCancel(string type, Guid id, [FromBody] List req) - { - try - { - var retirement = await _context.RetirementResignCancels - .Where(x => x.Id == id) - .FirstOrDefaultAsync(); - if (retirement == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var data = await _context.RetirementResignCancelApprovers - .Where(x => x.RetirementResignCancel.Id == id && x.ApproveType.ToUpper() == type.ToUpper()) - .ToListAsync(); - _context.RemoveRange(data); - - await _context.SaveChangesAsync(); - - var addList = new List(); - - foreach (var r in req) - { - addList.Add(new RetirementResignCancelApprover - { - Seq = r.Seq, - RetirementResignCancel = retirement, - Prefix = r.Prefix, - FirstName = r.FirstName, - LastName = r.LastName, - PositionName = r.PositionName, - ProfileId = r.ProfileId, - KeycloakId = r.KeycloakId, - Org = r.Org, - ApproveStatus = "PENDING", - ApproveType = type.Trim().ToUpper() - }); - } - await _context.AddRangeAsync(addList); - await _context.SaveChangesAsync(); - - return Success(); - - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// LV2_013 - เจ้าหน้าที่อนุมัติการลา ยกเลิก(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("admin-cancel/approve/officer/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> OfficerApproveRetirementResignCancelAsync(Guid id) - { - await _repository.OfficerApproveRetirementResignCancel(id); - - return Success(); - } - - /// - /// LV2_015 - ผู้บังคับบัญชาอนุมัติการลายกเลิก(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin-cancel/approve/comander/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CommanderApproveRetirementResignCancelAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.CommanderApproveRetirementResignCancel(id, req.Reason ?? "", null); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// ผู้บังคับบัญชาไม่อนุมัติการลายกเลิก(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin-cancel/reject/comander/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CommanderRejectRetirementResignCancelAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.CommanderRejectRetirementResignCancel(id, req.Reason ?? "", req.Date); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// LV2_016 - ผู้มีอำนาจอนุมัติการลา ยกเลิก(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin-cancel/approve/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> ApproveRetirementResignCancelAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.ApproveRetirementResignCancel(id, req.Reason ?? "", null); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// LV2_017 - ผู้มีอำนาจไม่อนุมัติการลา ยกเลิก(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin-cancel/reject/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> RejectRetirementResignCancelAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.RejectRetirementResignCancel(id, req.Reason ?? "", req.Date); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// แก้ไขข้อมูลการลาออกของข้าราชการ - /// - /// Id ลาออก - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin-update/resign-info/{id:length(36)}")] - public async Task> UpdateResignInfo([FromBody] RetirementUpdateResignInfoRequest req, Guid id) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_RESIGN"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var updated = await _context.RetirementResigns.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == id); - if (updated == null) - return Error(GlobalMessages.RetirementResignNotFound, 404); - - var ReasonResign = req.ReasonResign; - if (req.ReasonResign != null) - { - switch (req.ReasonResign.Trim().ToUpper()) - { - case "CAREER": ReasonResign = $"ประกอบอาชีพอื่น"; break; - case "MOVE": ReasonResign = $"รับราชการสังกัดอื่น"; break; - case "FAMILY": ReasonResign = $"ดูแลบิดามารดา"; break; - case "EDUCATION": ReasonResign = $"ศึกษาต่อ"; break; - case "OTHER": ReasonResign = $"อื่น ๆ"; break; - default: ReasonResign = string.Empty; break; - } - } - - updated.Location = !string.IsNullOrEmpty(req.Location) ? req.Location : updated.Location; - updated.ReasonResign = !string.IsNullOrEmpty(ReasonResign) ? ReasonResign : updated.ReasonResign; - updated.Reason = req.ReasonResign; - updated.Remark = !string.IsNullOrEmpty(req.Remark) ? req.Remark : null; - updated.SendDate = req.SendDate.HasValue ? req.SendDate : updated.SendDate; - updated.ActiveDate = req.ActiveDate.HasValue ? req.ActiveDate : updated.ActiveDate; - updated.LastUpdateFullName = FullName ?? "System Administrator"; - updated.LastUpdateUserId = UserId ?? ""; - updated.LastUpdatedAt = DateTime.Now; - await _context.SaveChangesAsync(); - return Success(); - } #endregion } } diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignEmployeeController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignEmployeeController.cs index dd0d850b..909663a5 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignEmployeeController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignEmployeeController.cs @@ -1,6 +1,5 @@ using BMA.EHR.Application.Repositories; using BMA.EHR.Application.Repositories.MessageQueue; -using BMA.EHR.Application.Responses.Profiles; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Models.Retirement; @@ -24,24 +23,22 @@ namespace BMA.EHR.Retirement.Service.Controllers [Produces("application/json")] [Authorize] [SwaggerTag("ระบบลาออกลูกจ้าง")] - public class RetirementResignEmployeeController : BaseController + public class RetirementResignEmployeeEmployeeController : BaseController { - private readonly RetirementEmployeeRepository _repository; + private readonly RetirementRepository _repository; private readonly NotificationRepository _repositoryNoti; private readonly ApplicationDBContext _context; private readonly MinIOService _documentService; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IConfiguration _configuration; - private readonly UserProfileRepository _userProfileRepository; private readonly PermissionRepository _permission; - public RetirementResignEmployeeController(RetirementEmployeeRepository repository, + public RetirementResignEmployeeEmployeeController(RetirementRepository repository, NotificationRepository repositoryNoti, ApplicationDBContext context, MinIOService documentService, IHttpContextAccessor httpContextAccessor, IConfiguration configuration, - UserProfileRepository userProfileRepository, PermissionRepository permission) { _repository = repository; @@ -50,7 +47,6 @@ namespace BMA.EHR.Retirement.Service.Controllers _documentService = documentService; _httpContextAccessor = httpContextAccessor; _configuration = configuration; - _userProfileRepository = userProfileRepository; _permission = permission; } @@ -60,7 +56,6 @@ namespace BMA.EHR.Retirement.Service.Controllers private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; - private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"]; #endregion /// @@ -78,7 +73,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -89,7 +84,7 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); var retirementResignEmployees = await _context.RetirementResignEmployees.AsQueryable() - .Where(x => x.Status != "DELETE" && x.profileId == org.result.profileId) + .Where(x => x.profileId == org.result.profileId) .OrderByDescending(x => x.CreatedAt) .Select(p => new { @@ -102,8 +97,8 @@ namespace BMA.EHR.Retirement.Service.Controllers p.Remark, p.ApproveReason, p.RejectReason, - p.CancelReason, - status = p.RetirementResignEmployeeCancels.FirstOrDefault() == null ? p.Status : p.RetirementResignEmployeeCancels.FirstOrDefault().Status, + p.CancelReason, + p.Status, statusCancel = p.RetirementResignEmployeeCancels.FirstOrDefault() == null ? null : p.RetirementResignEmployeeCancels.FirstOrDefault().Status, p.IsActive, }) @@ -128,7 +123,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -178,44 +173,8 @@ namespace BMA.EHR.Retirement.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; var retirementResignEmployees = await _context.RetirementResignEmployees.AsQueryable() - .Where(x => type.Trim().ToUpper() == "APPROVE" ? (x.Status == "APPROVE" || x.Status == "REJECT") : x.Status == type.Trim().ToUpper()) + .Where(x => x.Status == type.Trim().ToUpper()) .OrderByDescending(x => x.CreatedAt) .Select(p => new { @@ -244,52 +203,9 @@ namespace BMA.EHR.Retirement.Service.Controllers p.CancelReason, p.IsActive, p.CreatedAt, - p.ApproveStep, - p.Group, - p.rootDnaOldId, - p.child1DnaOldId, - p.child2DnaOldId, - p.child3DnaOldId, - p.child4DnaOldId, }) .ToListAsync(); - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - retirementResignEmployees = retirementResignEmployees - .Where(x => node == 4 ? x.child4DnaOldId == nodeId : (node == 3 ? x.child3DnaOldId == nodeId : (node == 2 ? x.child2DnaOldId == nodeId : (node == 1 ? x.child1DnaOldId == nodeId : (node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - retirementResignEmployees = retirementResignEmployees - .Where(x => node == 4 ? x.child3DnaOldId == nodeId : (node == 3 ? x.child2DnaOldId == nodeId : (node == 2 ? x.child1DnaOldId == nodeId : (node == 1 || node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - retirementResignEmployees = retirementResignEmployees - .Where(x => x.rootDnaOldId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // retirementResignEmployees = retirementResignEmployees - // .Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList(); - // } - else if (role == "NORMAL") - { - retirementResignEmployees = retirementResignEmployees.Where(x => - node == 0 ? x.rootDnaOldId == nodeId && x.child1DnaOldId == null : - node == 1 ? x.child1DnaOldId == nodeId && x.child2DnaOldId == null : - node == 2 ? x.child2DnaOldId == nodeId && x.child3DnaOldId == null : - node == 3 ? x.child3DnaOldId == nodeId && x.child4DnaOldId == null : - node == 4 ? x.child4DnaOldId == nodeId : - true - ).ToList(); - } - return Success(retirementResignEmployees); } @@ -310,44 +226,8 @@ namespace BMA.EHR.Retirement.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; var retirementResignEmployees = await _context.RetirementResignEmployeeCancels.AsQueryable() - .Where(x => type.Trim().ToUpper() == "APPROVE" ? (x.Status == "APPROVE" || x.Status == "REJECT") : x.Status == type.Trim().ToUpper()) + .Where(x => x.Status == type.Trim().ToUpper()) .OrderByDescending(x => x.CreatedAt) .Select(p => new { @@ -374,52 +254,9 @@ namespace BMA.EHR.Retirement.Service.Controllers p.CancelReason, p.IsActive, p.CreatedAt, - p.ApproveStep, - p.Group, - p.rootDnaOldId, - p.child1DnaOldId, - p.child2DnaOldId, - p.child3DnaOldId, - p.child4DnaOldId, }) .ToListAsync(); - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - retirementResignEmployees = retirementResignEmployees - .Where(x => node == 4 ? x.child4DnaOldId == nodeId : (node == 3 ? x.child3DnaOldId == nodeId : (node == 2 ? x.child2DnaOldId == nodeId : (node == 1 ? x.child1DnaOldId == nodeId : (node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - retirementResignEmployees = retirementResignEmployees - .Where(x => node == 4 ? x.child3DnaOldId == nodeId : (node == 3 ? x.child2DnaOldId == nodeId : (node == 2 ? x.child1DnaOldId == nodeId : (node == 1 || node == 0 ? x.rootDnaOldId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - retirementResignEmployees = retirementResignEmployees - .Where(x => x.rootDnaOldId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // retirementResignEmployees = retirementResignEmployees - // .Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList(); - // } - else if (role == "NORMAL") - { - retirementResignEmployees = retirementResignEmployees.Where(x => - node == 0 ? x.rootDnaOldId == nodeId && x.child1DnaOldId == null : - node == 1 ? x.child1DnaOldId == nodeId && x.child2DnaOldId == null : - node == 2 ? x.child2DnaOldId == nodeId && x.child3DnaOldId == null : - node == 3 ? x.child3DnaOldId == nodeId && x.child4DnaOldId == null : - node == 4 ? x.child4DnaOldId == nodeId : - true - ).ToList(); - } - return Success(retirementResignEmployees); } @@ -434,191 +271,6 @@ namespace BMA.EHR.Retirement.Service.Controllers /// เมื่อเกิดข้อผิดพลาดในการทำงาน [HttpGet("{id:length(36)}")] public async Task> GetDetailByUser(Guid id) - { - var dataMain = await _context.RetirementResignEmployees.AsQueryable() - .Where(x => x.Id == id) - .Select(p => new - { - p.IsCancel, - }) - .FirstOrDefaultAsync(); - if (dataMain == null) - return Error(GlobalMessages.RetirementResignEmployeeNotFound, 404); - - // if (dataMain.IsCancel != true) - // { - var data = await _context.RetirementResignEmployees.AsQueryable() - .Where(x => x.Id == id) - .Select(p => new - { - p.Id, - p.prefix, - p.firstName, - p.lastName, - p.profileId, - p.Location, - p.SendDate, - p.ActiveDate, - p.Reason, - p.ReasonResign, - p.Remark, - p.Status, - salary = p.AmountOld, - p.ApproveReason, - p.RejectReason, - p.IsActive, - p.CreatedAt, - p.PositionTypeOld, - p.PositionLevelOld, - p.PositionNumberOld, - p.OrganizationPositionOld, - p.OligarchReject, - p.OligarchApproveReason, - p.OligarchRejectReason, - p.OligarchRejectDate, - p.CommanderReject, - p.CommanderApproveReason, - p.CommanderRejectReason, - p.CommanderRejectDate, - p.OfficerReject, - p.OfficerApproveReason, - p.OfficerRejectReason, - p.OfficerRejectDate, - p.RemarkHorizontal, - p.rootOld, - p.rootOldId, - p.rootShortNameOld, - p.child1Old, - p.child1OldId, - p.child1ShortNameOld, - p.child2Old, - p.child2OldId, - p.child2ShortNameOld, - p.child3Old, - p.child3OldId, - p.child3ShortNameOld, - p.child4Old, - p.child4OldId, - p.child4ShortNameOld, - p.PositionOld, - p.posMasterNoOld, - p.posTypeOldId, - p.posTypeNameOld, - p.posLevelOldId, - p.posLevelNameOld, - p.IsNoDebt, - p.IsNoBurden, - p.IsDiscipline, - p.CancelReason, - p.ApproveStep, - p.Group, - Approvers = p.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"), - Commanders = p.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"), - KeycloakUserId = p.CreatedUserId, - RetirementResignEmployeeCancels = p.RetirementResignEmployeeCancels.FirstOrDefault(), - RetirementResignEmployeeDocs = p.RetirementResignEmployeeDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), - }) - .FirstOrDefaultAsync(); - if (data == null) - return Error(GlobalMessages.RetirementResignEmployeeNotFound, 404); - - var retirementResignEmployeeDocs = new List(); - foreach (var doc in data.RetirementResignEmployeeDocs) - { - var _doc = new - { - FileName = doc.FileName, - PathName = await _documentService.ImagesPath(doc.Id), - doc.Id, - }; - retirementResignEmployeeDocs.Add(_doc); - } - var _data = new - { - data.Id, - data.profileId, - data.prefix, - data.firstName, - data.lastName, - data.Location, - data.SendDate, - data.ActiveDate, - data.Reason, - data.ReasonResign, - data.Remark, - data.Status, - data.salary, - data.PositionTypeOld, - data.PositionLevelOld, - data.PositionNumberOld, - data.OrganizationPositionOld, - data.ApproveReason, - data.RejectReason, - data.IsActive, - data.CreatedAt, - data.OligarchReject, - data.OligarchApproveReason, - data.OligarchRejectReason, - data.OligarchRejectDate, - data.CommanderReject, - data.CommanderApproveReason, - data.CommanderRejectReason, - data.CommanderRejectDate, - data.OfficerReject, - data.OfficerApproveReason, - data.OfficerRejectReason, - data.OfficerRejectDate, - data.RemarkHorizontal, - data.rootOld, - data.rootOldId, - data.rootShortNameOld, - data.child1Old, - data.child1OldId, - data.child1ShortNameOld, - data.child2Old, - data.child2OldId, - data.child2ShortNameOld, - data.child3Old, - data.child3OldId, - data.child3ShortNameOld, - data.child4Old, - data.child4OldId, - data.child4ShortNameOld, - data.PositionOld, - data.posMasterNoOld, - data.posTypeOldId, - data.posTypeNameOld, - data.posLevelOldId, - data.posLevelNameOld, - data.IsNoDebt, - data.IsNoBurden, - data.IsDiscipline, - data.CancelReason, - data.KeycloakUserId, - data.Approvers, - data.Commanders, - data.ApproveStep, - data.Group, - idCancel = data.RetirementResignEmployeeCancels?.Id ?? Guid.Empty, - statusCancel = data.RetirementResignEmployeeCancels?.Status ?? null, - statusMain = data.Status == "CANCEL" ? "DONECANCEL" : data.Status, - Docs = retirementResignEmployeeDocs, - }; - - return Success(_data); - } - - /// - /// get รายละเอียดลาออก - /// - /// Id ลาออก - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("user/{id:length(36)}")] - public async Task> GetDetailByUsers(Guid id) { var dataMain = await _context.RetirementResignEmployees.AsQueryable() .Where(x => x.Id == id) @@ -632,10 +284,20 @@ namespace BMA.EHR.Retirement.Service.Controllers if (dataMain.IsCancel != true) { + var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "SYS_RESIGN_EMP"); var createdUserId = await _context.RetirementResignEmployees.AsQueryable() .Where(x => x.Id == id) .Where(x => x.CreatedUserId == UserId) .FirstOrDefaultAsync(); + if (getWorkflow == false && createdUserId == null) + { + var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_RESIGN_EMP"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") + { + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); + } + } var data = await _context.RetirementResignEmployees.AsQueryable() .Where(x => x.Id == id) .Select(p => new @@ -699,13 +361,6 @@ namespace BMA.EHR.Retirement.Service.Controllers p.IsNoBurden, p.IsDiscipline, p.CancelReason, - p.ApproveStep, - p.Group, - Approvers = p.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"), - Commanders = p.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"), - CancelApprovers = new List(), - CancelCommanders = new List(), - KeycloakUserId = p.CreatedUserId, RetirementResignEmployeeCancels = p.RetirementResignEmployeeCancels.FirstOrDefault(), RetirementResignEmployeeDocs = p.RetirementResignEmployeeDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), }) @@ -785,16 +440,9 @@ namespace BMA.EHR.Retirement.Service.Controllers data.IsNoBurden, data.IsDiscipline, data.CancelReason, - data.KeycloakUserId, - data.Approvers, - data.Commanders, - data.ApproveStep, - data.CancelApprovers, - data.CancelCommanders, - data.Group, idCancel = data.RetirementResignEmployeeCancels?.Id ?? Guid.Empty, statusCancel = data.RetirementResignEmployeeCancels?.Status ?? null, - statusMain = data.Status == "CANCEL" ? "DONECANCEL" : data.Status, + statusMain = data.Status, Docs = retirementResignEmployeeDocs, }; @@ -802,6 +450,20 @@ namespace BMA.EHR.Retirement.Service.Controllers } else { + var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "RETIREMENT_CANCEL_EMP"); + var createdUserId = await _context.RetirementResignEmployeeCancels.AsQueryable() + .Where(x => x.CreatedUserId == UserId) + .Where(x => x.Id == id) + .FirstOrDefaultAsync(); + if (getWorkflow == false && createdUserId == null) + { + var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_RESIGN_EMP"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") + { + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); + } + } var data = await _context.RetirementResignEmployeeCancels.AsQueryable() .Where(x => x.RetirementResignEmployee.Id == id) .Select(p => new @@ -863,13 +525,6 @@ namespace BMA.EHR.Retirement.Service.Controllers p.IsNoDebt, p.IsNoBurden, p.IsDiscipline, - p.ApproveStep, - p.Group, - Approvers = p.RetirementResignEmployee.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"), - Commanders = p.RetirementResignEmployee.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"), - CancelApprovers = p.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"), - CancelCommanders = p.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"), - KeycloakUserId = p.CreatedUserId, p.CancelReason, idMain = p.RetirementResignEmployee.Id, statusMain = p.RetirementResignEmployee.Status, @@ -952,13 +607,6 @@ namespace BMA.EHR.Retirement.Service.Controllers data.CancelReason, data.idMain, data.statusMain, - data.ApproveStep, - data.Group, - data.KeycloakUserId, - data.Approvers, - data.Commanders, - data.CancelApprovers, - data.CancelCommanders, statusCancel = data.Status, Docs = retirementResignEmployeeDocs, }; @@ -978,6 +626,19 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpGet("cancel/{id:length(36)}")] public async Task> GetDetailByUserCancel(Guid id) { + var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "RETIREMENT_CANCEL_EMP"); + var createdUserId = await _context.RetirementResignEmployeeCancels.AsQueryable() + .Where(x => x.CreatedUserId == UserId) + .FirstOrDefaultAsync(); + if (getWorkflow == false && createdUserId == null) + { + var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_RESIGN_EMP"); + var jsonData = JsonConvert.DeserializeObject(getPermission); + if (jsonData["status"]?.ToString() != "200") + { + return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); + } + } var data = await _context.RetirementResignEmployeeCancels.AsQueryable() .Where(x => x.Id == id) .Select(p => new @@ -1040,11 +701,6 @@ namespace BMA.EHR.Retirement.Service.Controllers p.IsNoBurden, p.IsDiscipline, p.CancelReason, - p.ApproveStep, - p.Group, - Approvers = p.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"), - Commanders = p.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"), - KeycloakUserId = p.CreatedUserId, idMain = p.RetirementResignEmployee.Id, statusMain = p.RetirementResignEmployee.Status, RetirementResignEmployeeDocs = p.RetirementResignEmployee.RetirementResignEmployeeDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }), @@ -1127,11 +783,6 @@ namespace BMA.EHR.Retirement.Service.Controllers data.CancelReason, data.idMain, data.statusMain, - data.KeycloakUserId, - data.ApproveStep, - data.Group, - data.Approvers, - data.Commanders, Docs = retirementResignEmployeeDocs, }; return Success(_data); @@ -1162,7 +813,6 @@ namespace BMA.EHR.Retirement.Service.Controllers } var retirementResignEmployee = new RetirementResignEmployee { - ApproveStep = "st1", Location = req.Location, SendDate = DateTime.Now, ActiveDate = req.ActiveDate, @@ -1183,7 +833,7 @@ namespace BMA.EHR.Retirement.Service.Controllers using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); var _res = await client.SendAsync(_req); var _result = await _res.Content.ReadAsStringAsync(); @@ -1227,25 +877,13 @@ namespace BMA.EHR.Retirement.Service.Controllers retirementResignEmployee.PositionOld = org.result.position; retirementResignEmployee.PositionLevelOld = org.result.posLevelName; retirementResignEmployee.PositionTypeOld = org.result.posTypeName; - retirementResignEmployee.PositionNumberOld = org.result.posNo; + retirementResignEmployee.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo; retirementResignEmployee.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + (org.result.child3 == null ? "" : org.result.child3 + "\n") + (org.result.child2 == null ? "" : org.result.child2 + "\n") + (org.result.child1 == null ? "" : org.result.child1 + "\n") + (org.result.root == null ? "" : org.result.root); retirementResignEmployee.OrganizationPositionOld = org.result.position + "\n" + retirementResignEmployee.OrganizationOld; - if ((retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "ชำนาญงาน") || (retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "ปฏิบัติงาน") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ปฏิบัติการ") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ชำนาญการ")) - { - retirementResignEmployee.Group = "1.1"; - } - else if ((retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "อาวุโส") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ชำนาญการพิเศษ") || (retirementResignEmployee.posTypeNameOld == "อำนวยการ" && retirementResignEmployee.posLevelNameOld == "ต้น")) - { - retirementResignEmployee.Group = "1.2"; - } - else if ((retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "ทักษะพิเศษ") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "เชี่ยวชาญ") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ทรงคุณวุฒิ") || (retirementResignEmployee.posTypeNameOld == "อำนวยการ" && retirementResignEmployee.posLevelNameOld == "สูง") || (retirementResignEmployee.posTypeNameOld == "บริหาร" && retirementResignEmployee.posLevelNameOld == "ต้น") || (retirementResignEmployee.posTypeNameOld == "บริหาร" && retirementResignEmployee.posLevelNameOld == "สูง")) - { - retirementResignEmployee.Group = "2"; - } } await _context.RetirementResignEmployees.AddAsync(retirementResignEmployee); await _context.SaveChangesAsync(); @@ -1276,160 +914,18 @@ namespace BMA.EHR.Retirement.Service.Controllers } } await _context.SaveChangesAsync(); - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync($"{_configuration["API"]}/org/workflow/add-workflow", new - // { - // refId = retirementResignEmployee.Id, - // sysName = "SYS_RESIGN_EMP", - // posLevelName = retirementResignEmployee.PositionLevelOld, - // posTypeName = retirementResignEmployee.PositionTypeOld, - // }); - // } - return Success(retirementResignEmployee); - } - - /// - /// สร้างการลาออก โดย admin - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("admin")] - public async Task> PostAdmin([FromForm] RetirementResignEmployeeAdminRequest req) - { - var Remark = req.Remark; - if (req.Reason != null) - { - switch (req.Reason.Trim().ToUpper()) - { - case "CAREER": Remark = $"ประกอบอาชีพอื่น" + (req.Remark == null || req.Remark == "" ? $"{req.Remark}" : ""); break; - case "MOVE": Remark = $"รับราชการสังกัดอื่น" + (req.Remark == null || req.Remark == "" ? $"{req.Remark}" : ""); break; - case "FAMILY": Remark = $"ดูแลบิดามารดา" + (req.Remark == null || req.Remark == "" ? $"{req.Remark}" : ""); break; - case "EDUCATION": Remark = $"ศึกษาต่อ" + (req.Remark == null || req.Remark == "" ? $"{req.Remark}" : ""); break; - case "OTHER": Remark = $"อื่น ๆ" + (req.Remark == null || req.Remark == "" ? $"{req.Remark}" : ""); break; - } - } - var retirementResignEmployee = new RetirementResignEmployee - { - ApproveStep = "st1", - Location = req.Location, - SendDate = DateTime.Now, - ActiveDate = req.ActiveDate, - Reason = req.Reason, - ReasonResign = Remark, - Remark = req.Remark, - Status = "APPROVE", - IsActive = true, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }; - - var apiUrl = $"{_configuration["API"]}/org/profile-employee/profileid/position/{req.ProfileId}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); - var _res = await client.SendAsync(_req); - var _result = await _res.Content.ReadAsStringAsync(); - - var org = JsonConvert.DeserializeObject(_result); - - if (org == null || org.result == null) - return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); - - retirementResignEmployee.profileId = org.result.profileId; - retirementResignEmployee.prefix = org.result.prefix; - retirementResignEmployee.firstName = org.result.firstName; - retirementResignEmployee.lastName = org.result.lastName; - retirementResignEmployee.citizenId = org.result.citizenId; - retirementResignEmployee.rootOld = org.result.root; - retirementResignEmployee.rootOldId = org.result.rootId; - retirementResignEmployee.rootDnaOldId = org.result.rootDnaId; - retirementResignEmployee.rootShortNameOld = org.result.rootShortName; - retirementResignEmployee.child1Old = org.result.child1; - retirementResignEmployee.child1OldId = org.result.child1Id; - retirementResignEmployee.child1DnaOldId = org.result.child1DnaId; - retirementResignEmployee.child1ShortNameOld = org.result.child1ShortName; - retirementResignEmployee.child2Old = org.result.child2; - retirementResignEmployee.child2OldId = org.result.child2Id; - retirementResignEmployee.child2DnaOldId = org.result.child2DnaId; - retirementResignEmployee.child2ShortNameOld = org.result.child2ShortName; - retirementResignEmployee.child3Old = org.result.child3; - retirementResignEmployee.child3OldId = org.result.child3Id; - retirementResignEmployee.child3DnaOldId = org.result.child3DnaId; - retirementResignEmployee.child3ShortNameOld = org.result.child3ShortName; - retirementResignEmployee.child4Old = org.result.child4; - retirementResignEmployee.child4OldId = org.result.child4Id; - retirementResignEmployee.child4DnaOldId = org.result.child4DnaId; - retirementResignEmployee.child4ShortNameOld = org.result.child4ShortName; - retirementResignEmployee.posMasterNoOld = org.result.posMasterNo; - retirementResignEmployee.posTypeOldId = org.result.posTypeId; - retirementResignEmployee.posTypeNameOld = org.result.posTypeName; - retirementResignEmployee.posLevelOldId = org.result.posLevelId; - retirementResignEmployee.posLevelNameOld = org.result.posLevelName; - retirementResignEmployee.AmountOld = org.result.salary; - retirementResignEmployee.PositionOld = org.result.position; - retirementResignEmployee.PositionLevelOld = org.result.posLevelName; - retirementResignEmployee.PositionTypeOld = org.result.posTypeName; - retirementResignEmployee.PositionNumberOld = org.result.posNo; - retirementResignEmployee.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "\n") + - (org.result.child3 == null ? "" : org.result.child3 + "\n") + - (org.result.child2 == null ? "" : org.result.child2 + "\n") + - (org.result.child1 == null ? "" : org.result.child1 + "\n") + - (org.result.root == null ? "" : org.result.root); - retirementResignEmployee.OrganizationPositionOld = org.result.position + "\n" + retirementResignEmployee.OrganizationOld; - if ((retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "ชำนาญงาน") || (retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "ปฏิบัติงาน") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ปฏิบัติการ") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ชำนาญการ")) + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync($"{_configuration["API"]}/org/workflow/add-workflow", new { - retirementResignEmployee.Group = "1.1"; - } - else if ((retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "อาวุโส") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ชำนาญการพิเศษ") || (retirementResignEmployee.posTypeNameOld == "อำนวยการ" && retirementResignEmployee.posLevelNameOld == "ต้น")) - { - retirementResignEmployee.Group = "1.2"; - } - else if ((retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "ทักษะพิเศษ") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "เชี่ยวชาญ") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ทรงคุณวุฒิ") || (retirementResignEmployee.posTypeNameOld == "อำนวยการ" && retirementResignEmployee.posLevelNameOld == "สูง") || (retirementResignEmployee.posTypeNameOld == "บริหาร" && retirementResignEmployee.posLevelNameOld == "ต้น") || (retirementResignEmployee.posTypeNameOld == "บริหาร" && retirementResignEmployee.posLevelNameOld == "สูง")) - { - retirementResignEmployee.Group = "2"; - } + refId = retirementResignEmployee.Id, + sysName = "SYS_RESIGN_EMP", + posLevelName = retirementResignEmployee.PositionLevelOld, + posTypeName = retirementResignEmployee.PositionTypeOld, + }); } - await _context.RetirementResignEmployees.AddAsync(retirementResignEmployee); - await _context.SaveChangesAsync(); - if (Request.Form.Files != null && Request.Form.Files.Count != 0) - { - foreach (var file in Request.Form.Files) - { - var fileExtension = Path.GetExtension(file.FileName); - - var doc = await _documentService.UploadFileAsync(file, file.FileName); - var _doc = await _context.Documents.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == doc.Id); - if (_doc != null) - { - var retirementResignEmployeeDoc = new RetirementResignEmployeeDoc - { - RetirementResignEmployee = retirementResignEmployee, - Document = _doc, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }; - await _context.RetirementResignEmployeeDocs.AddAsync(retirementResignEmployeeDoc); - } - } - } - await _context.SaveChangesAsync(); return Success(retirementResignEmployee); } @@ -1450,10 +946,7 @@ namespace BMA.EHR.Retirement.Service.Controllers return Error(GlobalMessages.RetirementResignEmployeeNotFound, 404); updated.Location = req.Location; - if (req.SendDate != null) - { - updated.SendDate = req.SendDate; - } + updated.ActiveDate = req.ActiveDate; // updated.Reason = req.Reason; updated.Remark = req.Remark; updated.ReasonResign = req.Reason; @@ -1569,17 +1062,14 @@ namespace BMA.EHR.Retirement.Service.Controllers public async Task> Cancel([FromBody] RetirementReasonRequest req, Guid id) { var updated = await _context.RetirementResignEmployees.AsQueryable() - .Include(x => x.Approvers) .FirstOrDefaultAsync(x => x.Id == id); if (updated == null) return Error(GlobalMessages.RetirementResignEmployeeNotFound, 404); updated.CancelReason = req.Reason; - if (updated.Status == "DONE" || updated.Status == "WAITING") + if (updated.Status == "DONE") { var retirementResignEmployeeCancel = new RetirementResignEmployeeCancel { - ApproveStep = "st1", - Group = updated.Group, Location = updated.Location, SendDate = updated.SendDate, ActiveDate = updated.ActiveDate, @@ -1619,23 +1109,18 @@ namespace BMA.EHR.Retirement.Service.Controllers citizenId = updated.citizenId, rootOld = updated.rootOld, rootOldId = updated.rootOldId, - rootDnaOldId = updated.rootDnaOldId, rootShortNameOld = updated.rootShortNameOld, child1Old = updated.child1Old, child1OldId = updated.child1OldId, - child1DnaOldId = updated.child1DnaOldId, child1ShortNameOld = updated.child1ShortNameOld, child2Old = updated.child2Old, child2OldId = updated.child2OldId, - child2DnaOldId = updated.child2DnaOldId, child2ShortNameOld = updated.child2ShortNameOld, child3Old = updated.child3Old, child3OldId = updated.child3OldId, - child3DnaOldId = updated.child3DnaOldId, child3ShortNameOld = updated.child3ShortNameOld, child4Old = updated.child4Old, child4OldId = updated.child4OldId, - child4DnaOldId = updated.child4DnaOldId, child4ShortNameOld = updated.child4ShortNameOld, posMasterNoOld = updated.posMasterNoOld, posTypeOldId = updated.posTypeOldId, @@ -1653,44 +1138,30 @@ namespace BMA.EHR.Retirement.Service.Controllers }; await _context.RetirementResignEmployeeCancels.AddAsync(retirementResignEmployeeCancel); await _context.SaveChangesAsync(); - var addList = new List(); - - foreach (var r in updated.Approvers) + using (var client = new HttpClient()) { - addList.Add(new RetirementResignEmployeeCancelApprover + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync($"{_configuration["API"]}/org/workflow/add-workflow", new { - Seq = r.Seq, - RetirementResignEmployeeCancel = retirementResignEmployeeCancel, - Prefix = r.Prefix, - FirstName = r.FirstName, - LastName = r.LastName, - PositionName = r.PositionName, - ProfileId = r.ProfileId, - KeycloakId = r.KeycloakId, - Org = r.Org, - ApproveStatus = "PENDING", - ApproveType = r.ApproveType + refId = retirementResignEmployeeCancel.Id, + sysName = "RETIREMENT_CANCEL_EMP", + posLevelName = retirementResignEmployeeCancel.PositionLevelOld, + posTypeName = retirementResignEmployeeCancel.PositionTypeOld, }); } - await _context.AddRangeAsync(addList); - await _context.SaveChangesAsync(); updated.IsCancel = true; - updated.Status = "CANCELING"; } else if (updated.Status == "REPORT") { using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); var _res = await client.DeleteAsync($"{_configuration["API"]}/org/command/tab2Cancel23/{updated.Id}"); } - updated.Status = "CANCEL"; - } - else - { - updated.Status = "CANCEL"; } + updated.Status = "CANCEL"; updated.LastUpdateFullName = FullName ?? "System Administrator"; updated.LastUpdateUserId = UserId ?? ""; updated.LastUpdatedAt = DateTime.Now; @@ -1722,47 +1193,6 @@ namespace BMA.EHR.Retirement.Service.Controllers return Success(); } - /// - /// API ลบรายการลาออกลูกจ้าง (ADMIN) - /// - /// Id ลาออก - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpDelete("admin/{id:length(36)}")] - public async Task> DeleteForAdminAsync(Guid id) - { - var jsonData = await _permission.GetPermissionWithActingAPIAsync("DELETE", "SYS_RESIGN_EMP"); - if (jsonData!.status != 200) - { - return Error(jsonData.message, StatusCodes.Status403Forbidden); - } - // ตรวจสอบว่า role ต้องเป็น OWNER เท่านั้น - if (jsonData.result.privilege != "OWNER") - { - return Error("ไม่มีสิทธิ์ในการลบรายการลาออกลูกจ้าง", StatusCodes.Status403Forbidden); - } - var deleted = await _context.RetirementResignEmployees.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == id); - if (deleted == null) - return Error(GlobalMessages.RetirementResignEmployeeNotFound, 404); - - // ห้ามลบเฉพาะสถานะ REPORT, WAITING, DONE, CANCELING, CANCEL - if (new[] { "REPORT", "WAITING", "DONE", "CANCELING", "CANCEL" }.Contains(deleted.Status)) - { - return Error("ไม่สามารถลบรายการลาออกลูกจ้างสถานะนี้ได้"); - } - - deleted.Status = "DELETE"; - deleted.LastUpdateFullName = FullName ?? "System Administrator"; - deleted.LastUpdateUserId = UserId ?? ""; - deleted.LastUpdatedAt = DateTime.Now; - await _context.SaveChangesAsync(); - return Success(); - } - /// /// อนุมัติคำลาออก /// @@ -2092,43 +1522,7 @@ namespace BMA.EHR.Retirement.Service.Controllers { return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); } - string role = jsonData["result"]?.ToString(); - var nodeId = string.Empty; - var profileAdmin = new GetUserOCAllDto(); - profileAdmin = await _userProfileRepository.GetUserOCAll(Guid.Parse(UserId!), AccessToken); - if (role == "NORMAL" || role == "CHILD") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child4DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 1 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "BROTHER") - { - nodeId = profileAdmin?.Node == 4 - ? profileAdmin?.Child3DnaId - : profileAdmin?.Node == 3 - ? profileAdmin?.Child2DnaId - : profileAdmin?.Node == 2 - ? profileAdmin?.Child1DnaId - : profileAdmin?.Node == 1 || profileAdmin?.Node == 0 - ? profileAdmin?.RootDnaId - : ""; - } - else if (role == "ROOT" /*|| role == "PARENT"*/) - { - nodeId = profileAdmin?.RootDnaId; - } - - var node = profileAdmin?.Node; - var data = await _context.RetirementEmployeeQuestions.AsQueryable() + var data = await _context.RetirementQuestions.AsQueryable() .OrderByDescending(x => x.CreatedAt) .Select(p => new { @@ -2153,131 +1547,11 @@ namespace BMA.EHR.Retirement.Service.Controllers LastUpdatedAt = p.LastUpdatedAt, CreatedAt = p.CreatedAt, AppointDate = p.AppointDate, - p.rootDnaId, - p.child1DnaId, - p.child2DnaId, - p.child3DnaId, - p.child4DnaId, }) .ToListAsync(); - - if (role == "OWNER") - { - node = null; - } - if (role == "OWNER" || role == "CHILD") - { - data = data - .Where(x => node == 4 ? x.child4DnaId == nodeId : (node == 3 ? x.child3DnaId == nodeId : (node == 2 ? x.child2DnaId == nodeId : (node == 1 ? x.child1DnaId == nodeId : (node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true)))))).ToList(); - } - else if (role == "BROTHER") - { - data = data - .Where(x => node == 4 ? x.child3DnaId == nodeId : (node == 3 ? x.child2DnaId == nodeId : (node == 2 ? x.child1DnaId == nodeId : (node == 1 || node == 0 ? x.rootDnaId == nodeId : (node == null ? true : true))))).ToList(); - } - else if (role == "ROOT") - { - data = data - .Where(x => x.rootDnaId == nodeId).ToList(); - } - // else if (role == "PARENT") - // { - // data = data - // .Where(x => x.rootDnaId == nodeId && x.child1DnaId != null).ToList(); - // } - else if (role == "NORMAL") - { - data = data.Where(x => - node == 0 ? x.rootDnaId == nodeId && x.child1DnaId == null : - node == 1 ? x.child1DnaId == nodeId && x.child2DnaId == null : - node == 2 ? x.child2DnaId == nodeId && x.child3DnaId == null : - node == 3 ? x.child3DnaId == nodeId && x.child4DnaId == null : - node == 4 ? x.child4DnaId == nodeId : - true - ).ToList(); - } return Success(data); } - /// - /// สร้างแบบสอบถามหลังลาออก - /// - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("questionnaire")] - public async Task> PostQuestion([FromBody] RetirementQuestionRequest req) - { - var retirementResign = await _context.RetirementResignEmployees.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == req.RetirementResignId); - if (retirementResign == null) - return Error(GlobalMessages.RetirementResignNotFound); - - var period = new RetirementEmployeeQuestion - { - RetirementResignEmployee = retirementResign, - ReasonWork = Newtonsoft.Json.JsonConvert.SerializeObject(req.ReasonWork), - ReasonWorkOther = req.ReasonWorkOther, - TimeThink = req.TimeThink, - ExitFactor = Newtonsoft.Json.JsonConvert.SerializeObject(req.ExitFactor), - ExitFactorOther = req.ExitFactorOther, - Adjust = Newtonsoft.Json.JsonConvert.SerializeObject(req.Adjust), - AdjustOther = req.AdjustOther, - RealReason = req.RealReason, - NotExitFactor = req.NotExitFactor, - Havejob = req.Havejob, - HavejobReason = req.HavejobReason, - SuggestFriends = req.SuggestFriends, - SuggestFriendsReason = req.SuggestFriendsReason, - FutureWork = req.FutureWork, - FutureWorkReason = req.FutureWorkReason, - Suggestion = req.Suggestion, - CreatedFullName = FullName ?? "System Administrator", - CreatedUserId = UserId ?? "", - CreatedAt = DateTime.Now, - LastUpdateFullName = FullName ?? "System Administrator", - LastUpdateUserId = UserId ?? "", - LastUpdatedAt = DateTime.Now, - }; - - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - var apiUrl = $"{_configuration["API"]}/org/profile-employee/profileid/position/{retirementResign.profileId}"; - var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); - var _res = await client.SendAsync(_req); - var _result = await _res.Content.ReadAsStringAsync(); - - var org = JsonConvert.DeserializeObject(_result); - - if (org == null || org.result == null) - return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404); - - period.root = org.result.root; - period.rootId = org.result.rootId; - period.rootDnaId = org.result.rootDnaId; - period.child1 = org.result.child1; - period.child1Id = org.result.child1Id; - period.child1DnaId = org.result.child1DnaId; - period.child2 = org.result.child2; - period.child2Id = org.result.child2Id; - period.child2DnaId = org.result.child2DnaId; - period.child3 = org.result.child3; - period.child3Id = org.result.child3Id; - period.child3DnaId = org.result.child3DnaId; - period.child4 = org.result.child4; - period.child4Id = org.result.child4Id; - period.child4DnaId = org.result.child4DnaId; - } - await _context.RetirementEmployeeQuestions.AddAsync(period); - await _context.SaveChangesAsync(); - - return Success(); - } - /// /// ส่งรายชื่อออกคำสั่ง C-PM-23 /// @@ -2353,8 +1627,8 @@ namespace BMA.EHR.Retirement.Service.Controllers ActiveDate = p.ActiveDate == null ? "" : p.ActiveDate.Value.ToThaiShortDate2().ToThaiNumber(), Salary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), Remark = p.Reason ?? "", - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -2418,10 +1692,7 @@ namespace BMA.EHR.Retirement.Service.Controllers positionType = p.PositionTypeOld, positionLevel = p.PositionLevelOld, isLeave = p.IsCancel == true ? false : true, - //leaveReason = "ออกจากราชการ", - leaveReason = p.ReasonResign == "อื่น ๆ" - ? string.IsNullOrWhiteSpace(p.Remark) ? p.ReasonResign : $"{p.ReasonResign}({p.Remark})" - : p.ReasonResign, + leaveReason = "ออกจากราชการ", dateLeave = r.commandDateAffect, commandId = r.commandId, isGovernment = false, @@ -2444,42 +1715,26 @@ namespace BMA.EHR.Retirement.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - resignId = p.Id, }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // // // var _result = await _res.Content.ReadAsStringAsync(); - // // // if (_res.IsSuccessStatusCode) - // // // { - // // // data.ForEach(profile => profile.Status = "DONE"); - // // // await _context.SaveChangesAsync(); - // // // } - // } - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new + { + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) + { + data.ForEach(profile => profile.Status = "DONE"); + await _context.SaveChangesAsync(); + } + } + return Success(); } /// @@ -2556,14 +1811,14 @@ namespace BMA.EHR.Retirement.Service.Controllers (p.child2Old == null ? "" : $"{p.child2Old}\n") + (p.child1Old == null ? "" : $"{p.child1Old}\n") + (p.rootOld == null ? "" : $"{p.rootOld}"), - PositionLevel = p.PositionLevelOld?.ToThaiNumber() ?? "-", + PositionLevel = p.PositionLevelOld ?? "-", PositionType = p.PositionTypeOld ?? "-", PositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), ActiveDate = p.ActiveDate == null ? "-" : p.ActiveDate.Value.ToThaiShortDate2().ToThaiNumber(), Salary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), - Remark = p.Reason?.ToThaiNumber() ?? "-", - RemarkHorizontal = r.RemarkHorizontal == null ? "-" : r.RemarkHorizontal.ToThaiNumber(), - RemarkVertical = r.RemarkVertical == null ? "-" : r.RemarkVertical.ToThaiNumber() + Remark = p.Reason ?? "-", + RemarkHorizontal = r.RemarkHorizontal, + RemarkVertical = r.RemarkVertical, }).ToList(); var result = new List(); @@ -2653,512 +1908,29 @@ namespace BMA.EHR.Retirement.Service.Controllers commandCode = r.commandCode, commandName = r.commandName, remark = r.remark, - resignId = p.RetirementResignEmployee.Id }).ToList(); - #region Old: Circular Flow - // var baseAPIOrg = _configuration["API"]; - //var reportDone = false; - //if (data.Where(profile => profile.Status == "DONE").Any()) - //{ - // reportDone = true; - //} - - //if (reportDone == true) - //{ - // var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // data = resultData, - // }); - // // // var _result = await _res.Content.ReadAsStringAsync(); - // // // if (_res.IsSuccessStatusCode) - // // // { - // // // data.ForEach(profile => profile.Status = "DONE"); - // // // data.ForEach(profile => profile.RetirementResignEmployee.Status = "CANCEL"); - // // // await _context.SaveChangesAsync(); - // // // } - // } - //} - //else - //{ - // var apiUrlOrg = $"{baseAPIOrg}/org/command/cancel-resign"; - // using (var client = new HttpClient()) - // { - // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - // client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]); - // var _res = await client.PostAsJsonAsync(apiUrlOrg, new - // { - // resignId = resultData.Select(x => x.resignId).ToList(), - // }); - // var _result = await _res.Content.ReadAsStringAsync(); - // if (_res.IsSuccessStatusCode) - // { - // data.ForEach(profile => profile.Status = "DONE"); - // data.ForEach(profile => profile.RetirementResignEmployee.Status = "CANCEL"); - // await _context.SaveChangesAsync(); - // } - // } - //} - #endregion - - // New: Linear Flow - Task #224 ปรับให้เป็น process ที่ควรบันทึกตามลำดับ - var now = DateTime.Now; - data.ForEach(profile => + var baseAPIOrg = _configuration["API"]; + var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave"; + using (var client = new HttpClient()) { - profile.Status = "DONE"; - profile.LastUpdateFullName = FullName ?? "System Administrator"; - profile.LastUpdateUserId = UserId ?? ""; - profile.LastUpdatedAt = now; - }); - data.ForEach(profile => profile.RetirementResignEmployee.Status = "CANCEL"); - await _context.SaveChangesAsync(); - - // Return resultData for Node to process directly (Linear Flow) - return Success(resultData); - } - - /// - /// เพิ่มรายชิื่อผู้อนุมัติ หรือ ผู้บังคับบัญชา ลูกจ้าง - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("officer/add-resign/{type}/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> AddApprover(string type, Guid id, [FromBody] List req) - { - try - { - var retirement = await _context.RetirementResignEmployees - .Where(x => x.Id == id) - .FirstOrDefaultAsync(); - if (retirement == null) + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + var _res = await client.PostAsJsonAsync(apiUrlOrg, new { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var data = await _context.RetirementResignEmployeeApprovers - .Where(x => x.RetirementResignEmployee.Id == id && x.ApproveType.ToUpper() == type.ToUpper()) - .ToListAsync(); - _context.RemoveRange(data); - - await _context.SaveChangesAsync(); - - var addList = new List(); - - foreach (var r in req) + data = resultData, + }); + var _result = await _res.Content.ReadAsStringAsync(); + if (_res.IsSuccessStatusCode) { - addList.Add(new RetirementResignEmployeeApprover - { - Seq = r.Seq, - RetirementResignEmployee = retirement, - Prefix = r.Prefix, - FirstName = r.FirstName, - LastName = r.LastName, - PositionName = r.PositionName, - PositionExecutiveName = r.PositionExecutiveName, - ProfileId = r.ProfileId, - KeycloakId = r.KeycloakId, - Org = r.Org, - ApproveStatus = "PENDING", - ApproveType = type.Trim().ToUpper() - }); - } - await _context.AddRangeAsync(addList); - await _context.SaveChangesAsync(); - - return Success(); - - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// LV2_013 - เจ้าหน้าที่อนุมัติการลา ลูกจ้าง(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("admin/approve/officer/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> OfficerApproveRetirementResignEmployeeAsync(Guid id) - { - await _repository.OfficerApproveRetirementResignEmployee(id); - - return Success(); - } - - /// - /// LV2_015 - ผู้บังคับบัญชาอนุมัติการลาลูกจ้าง(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/approve/comander/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CommanderApproveRetirementResignEmployeeAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.CommanderApproveRetirementResignEmployee(id, req.Reason ?? "", null); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// ผู้บังคับบัญชาไม่อนุมัติการลาลูกจ้าง(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/reject/comander/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CommanderRejectRetirementResignEmployeeAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.CommanderRejectRetirementResignEmployee(id, req.Reason ?? "", req.Date); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// LV2_016 - ผู้มีอำนาจอนุมัติการลา ลูกจ้าง(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/approve/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> ApproveRetirementResignEmployeeAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.ApproveRetirementResignEmployee(id, req.Reason ?? "", null); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// LV2_017 - ผู้มีอำนาจไม่อนุมัติการลา ลูกจ้าง(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin/reject/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> RejectRetirementResignEmployeeAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.RejectRetirementResignEmployee(id, req.Reason ?? "", req.Date); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - - - - /// - /// เพิ่มรายชิื่อผู้อนุมัติ หรือ ผู้บังคับบัญชา ยกเลิก - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPost("officer-cancel/add-resign/{type}/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> AddApproverCancel(string type, Guid id, [FromBody] List req) - { - try - { - var retirement = await _context.RetirementResignEmployeeCancels - .Where(x => x.Id == id) - .FirstOrDefaultAsync(); - if (retirement == null) - { - return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound); - } - - var data = await _context.RetirementResignEmployeeCancelApprovers - .Where(x => x.RetirementResignEmployeeCancel.Id == id && x.ApproveType.ToUpper() == type.ToUpper()) - .ToListAsync(); - _context.RemoveRange(data); - - await _context.SaveChangesAsync(); - - var addList = new List(); - - foreach (var r in req) - { - addList.Add(new RetirementResignEmployeeCancelApprover - { - Seq = r.Seq, - RetirementResignEmployeeCancel = retirement, - Prefix = r.Prefix, - FirstName = r.FirstName, - LastName = r.LastName, - PositionName = r.PositionName, - ProfileId = r.ProfileId, - KeycloakId = r.KeycloakId, - Org = r.Org, - ApproveStatus = "PENDING", - ApproveType = type.Trim().ToUpper() - }); - } - await _context.AddRangeAsync(addList); - await _context.SaveChangesAsync(); - - return Success(); - - } - catch (Exception ex) - { - return Error(ex); - } - } - - /// - /// LV2_013 - เจ้าหน้าที่อนุมัติการลา ลูกจ้างยกเลิก(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("admin-cancel/approve/officer/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> OfficerApproveRetirementResignEmployeeCancelAsync(Guid id) - { - await _repository.OfficerApproveRetirementResignEmployeeCancel(id); - - return Success(); - } - - /// - /// LV2_015 - ผู้บังคับบัญชาอนุมัติการลาลูกจ้างยกเลิก(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin-cancel/approve/comander/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CommanderApproveRetirementResignEmployeeCancelAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.CommanderApproveRetirementResignEmployeeCancel(id, req.Reason ?? "", null); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// ผู้บังคับบัญชาไม่อนุมัติการลาลูกจ้างยกเลิก(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin-cancel/reject/comander/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> CommanderRejectRetirementResignEmployeeCancelAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.CommanderRejectRetirementResignEmployeeCancel(id, req.Reason ?? "", req.Date); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// LV2_016 - ผู้มีอำนาจอนุมัติการลา ลูกจ้างยกเลิก(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin-cancel/approve/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> ApproveRetirementResignEmployeeCancelAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.ApproveRetirementResignEmployeeCancel(id, req.Reason ?? "", null); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// LV2_017 - ผู้มีอำนาจไม่อนุมัติการลา ลูกจ้างยกเลิก(ADMIN) - /// - /// - /// - /// เมื่อทำรายการสำเร็จ - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin-cancel/reject/{id:guid}")] - [ProducesResponseType(StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] - [ProducesResponseType(StatusCodes.Status500InternalServerError)] - public async Task> RejectRetirementResignEmployeeCancelAsync(Guid id, - [FromBody] RetirementRequestApproveDto req) - { - try - { - await _repository.RejectRetirementResignEmployeeCancel(id, req.Reason ?? "", req.Date); - - return Success(); - } - catch (Exception ex) - { - return Error(ex); - } - - } - - /// - /// แก้ไขข้อมูลการลาออกของลูกจ้างประจำ - /// - /// Id ลาออก - /// - /// - /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง - /// ไม่ได้ Login เข้าระบบ - /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpPut("admin-update/resign-info/{id:length(36)}")] - public async Task> UpdateResignInfo([FromBody] RetirementUpdateResignInfoRequest req, Guid id) - { - var getPermission = await _permission.GetPermissionAPIAsync("UPDATE", "SYS_RESIGN_EMP"); - var jsonData = JsonConvert.DeserializeObject(getPermission); - if (jsonData["status"]?.ToString() != "200") - { - return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); - } - var updated = await _context.RetirementResignEmployees.AsQueryable() - .FirstOrDefaultAsync(x => x.Id == id); - if (updated == null) - return Error(GlobalMessages.RetirementResignNotFound, 404); - - var ReasonResign = req.ReasonResign; - if (req.ReasonResign != null) - { - switch (req.ReasonResign.Trim().ToUpper()) - { - case "CAREER": ReasonResign = $"ประกอบอาชีพอื่น"; break; - case "MOVE": ReasonResign = $"รับราชการสังกัดอื่น"; break; - case "FAMILY": ReasonResign = $"ดูแลบิดามารดา"; break; - case "EDUCATION": ReasonResign = $"ศึกษาต่อ"; break; - case "OTHER": ReasonResign = $"อื่น ๆ"; break; - default: ReasonResign = string.Empty; break; + data.ForEach(profile => profile.Status = "DONE"); + // var _data = await _context.RetirementResignEmployees + // .Where(x => data.Select(x => x.RetirementResignEmployee.Id).Contains(x.Id)) + // .ToListAsync(); + // _data.ForEach(profile => profile.Status = "DONEREJECT"); + await _context.SaveChangesAsync(); } } - - updated.Location = !string.IsNullOrEmpty(req.Location) ? req.Location : updated.Location; - updated.ReasonResign = !string.IsNullOrEmpty(ReasonResign) ? ReasonResign : updated.ReasonResign; - updated.Reason = req.ReasonResign; - updated.Remark = !string.IsNullOrEmpty(req.Remark) ? req.Remark : null; - updated.SendDate = req.SendDate.HasValue ? req.SendDate : updated.SendDate; - updated.ActiveDate = req.ActiveDate.HasValue ? req.ActiveDate : updated.ActiveDate; - updated.LastUpdateFullName = FullName ?? "System Administrator"; - updated.LastUpdateUserId = UserId ?? ""; - updated.LastUpdatedAt = DateTime.Now; - await _context.SaveChangesAsync(); return Success(); } } diff --git a/BMA.EHR.Retirement.Service/Program.cs b/BMA.EHR.Retirement.Service/Program.cs index a55f9674..f8cf5bf8 100644 --- a/BMA.EHR.Retirement.Service/Program.cs +++ b/BMA.EHR.Retirement.Service/Program.cs @@ -3,7 +3,6 @@ using BMA.EHR.Domain.Middlewares; using BMA.EHR.Infrastructure; using BMA.EHR.Infrastructure.Persistence; using BMA.EHR.Retirement.Service; -using BMA.EHR.Retirement.Service.Services; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ApiExplorer; @@ -87,7 +86,6 @@ var builder = WebApplication.CreateBuilder(args); builder.Services.AddApplication(); builder.Services.AddLeaveApplication(); builder.Services.AddPersistence(builder.Configuration); - builder.Services.AddScoped(); builder.Services.AddLeavePersistence(builder.Configuration); builder.Services.AddHttpClient(); @@ -157,14 +155,13 @@ var app = builder.Build(); app.UseHttpsRedirection(); app.UseCors(); - app.UseMiddleware(); app.UseAuthentication(); app.UseAuthorization(); app.UseDefaultFiles(); app.UseStaticFiles(); app.MapControllers(); - // app.UseMiddleware(); - // app.UseMiddleware(); + app.UseMiddleware(); + app.UseMiddleware(); app.UseHangfireDashboard("/hangfire", new DashboardOptions() { diff --git a/BMA.EHR.Retirement.Service/Requests/OrgRequest.cs b/BMA.EHR.Retirement.Service/Requests/OrgRequest.cs index 0dda38be..c859378c 100644 --- a/BMA.EHR.Retirement.Service/Requests/OrgRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/OrgRequest.cs @@ -48,12 +48,9 @@ namespace BMA.EHR.Retirement.Service.Requests public int? posLevelRank { get; set; } public string? posExecutiveId { get; set; } public string? posExecutiveName { get; set; } - public string? positionExecutiveField { get; set; } - public string? positionArea { get; set; } public string? posNo { get; set; } public DateTime? leaveDate { get; set; } public string? education { get; set; } public double? salary { get; set; } - public string? org { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Retirement.Service/Requests/OrgRequestArray.cs b/BMA.EHR.Retirement.Service/Requests/OrgRequestArray.cs index d03b9738..de96af94 100644 --- a/BMA.EHR.Retirement.Service/Requests/OrgRequestArray.cs +++ b/BMA.EHR.Retirement.Service/Requests/OrgRequestArray.cs @@ -42,8 +42,6 @@ namespace BMA.EHR.Retirement.Service.Requests public int? posLevelRank { get; set; } public string? posExecutiveId { get; set; } public string? posExecutiveName { get; set; } - public string? positionExecutiveField { get; set; } - public string? positionArea { get; set; } public string? posNo { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Retirement.Service/Requests/PersonSelectPositionOtherRequest.cs b/BMA.EHR.Retirement.Service/Requests/PersonSelectPositionOtherRequest.cs index 44c2da54..e9dfc86c 100644 --- a/BMA.EHR.Retirement.Service/Requests/PersonSelectPositionOtherRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/PersonSelectPositionOtherRequest.cs @@ -29,9 +29,6 @@ namespace BMA.EHR.Retirement.Service.Requests public string? posLevelId { get; set; } public string? posLevelName { get; set; } public string? typeCommand { get; set; } - public string? posExecutiveId { get; set; } public string? posExecutiveName { get; set; } - public string? positionExecutiveField { get; set; } - public string? positionArea { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Retirement.Service/Requests/ProfileJsonRequest.cs b/BMA.EHR.Retirement.Service/Requests/ProfileJsonRequest.cs index bb5b8317..3521bf91 100644 --- a/BMA.EHR.Retirement.Service/Requests/ProfileJsonRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/ProfileJsonRequest.cs @@ -58,8 +58,6 @@ namespace BMA.EHR.Retirement.Service.Requests public int? posLevelRank { get; set; } public string? posExecutiveId { get; set; } public string? posExecutiveName { get; set; } - public string? positionExecutiveField { get; set; } - public string? positionArea { get; set; } public string? posNo { get; set; } } } diff --git a/BMA.EHR.Retirement.Service/Requests/ReportPersonRequest.cs b/BMA.EHR.Retirement.Service/Requests/ReportPersonRequest.cs index 968628a4..31fd36dd 100644 --- a/BMA.EHR.Retirement.Service/Requests/ReportPersonRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/ReportPersonRequest.cs @@ -6,6 +6,6 @@ namespace BMA.EHR.Retirement.Service.Requests public class ReportPersonRequest { public string[] refIds { get; set; } - public string? status { get; set; } + public string status { get; set; } } } diff --git a/BMA.EHR.Retirement.Service/Requests/RetirementRequestApproveDto.cs b/BMA.EHR.Retirement.Service/Requests/RetirementRequestApproveDto.cs deleted file mode 100644 index 4eb7ed32..00000000 --- a/BMA.EHR.Retirement.Service/Requests/RetirementRequestApproveDto.cs +++ /dev/null @@ -1,9 +0,0 @@ - -namespace BMA.EHR.Retirement.Service.Requests -{ - public class RetirementRequestApproveDto - { - public string? Reason { get; set; } - public DateTime? Date { get; set; } - } -} diff --git a/BMA.EHR.Retirement.Service/Requests/RetirementRequestApproverDto.cs b/BMA.EHR.Retirement.Service/Requests/RetirementRequestApproverDto.cs deleted file mode 100644 index a10ade35..00000000 --- a/BMA.EHR.Retirement.Service/Requests/RetirementRequestApproverDto.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Newtonsoft.Json; - -namespace BMA.EHR.Retirement.Service.Requests -{ - public class RetirementRequestApproverDto - { - [JsonProperty("seq")] - public int Seq { get; set; } = 0; - - [JsonProperty("prefix")] - public string Prefix { get; set; } = string.Empty; - - [JsonProperty("firstName")] - public string FirstName { get; set; } = string.Empty; - - [JsonProperty("lastName")] - public string LastName { get; set; } = string.Empty; - - [JsonProperty("positionName")] - public string PositionName { get; set; } = string.Empty; - - [JsonProperty("positionExecutiveName")] - public string PositionExecutiveName { get; set; } = string.Empty; - - [JsonProperty("profileId")] - public Guid ProfileId { get; set; } = Guid.Empty; - - [JsonProperty("keycloakId")] - public Guid KeycloakId { get; set; } = Guid.Empty; - - [JsonProperty("org")] - public string Org { get; set; } = string.Empty; - } -} diff --git a/BMA.EHR.Retirement.Service/Requests/RetirementResignEmployeeRequest.cs b/BMA.EHR.Retirement.Service/Requests/RetirementResignEmployeeRequest.cs index e1b1a3cf..409bc185 100644 --- a/BMA.EHR.Retirement.Service/Requests/RetirementResignEmployeeRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/RetirementResignEmployeeRequest.cs @@ -6,24 +6,7 @@ namespace BMA.EHR.Retirement.Service.Requests public class RetirementResignEmployeeRequest { public string? Location { get; set; } - public DateTime? SendDate { get; set; } - public DateTime? ActiveDate { get; set; } - public string? Reason { get; set; } - public string? Remark { get; set; } - public string? ReasonResign { get; set; } - public string? OrganizationPositionOld { get; set; } - public string? PositionTypeOld { get; set; } - public string? PositionLevelOld { get; set; } - public string? PositionNumberOld { get; set; } - public string? RemarkHorizontal { get; set; } - public double? AmountOld { get; set; } - public List? File { get; set; } - } - - public class RetirementResignEmployeeAdminRequest - { - public string ProfileId { get; set; } - public string? Location { get; set; } + // public DateTime? SendDate { get; set; } public DateTime? ActiveDate { get; set; } public string? Reason { get; set; } public string? Remark { get; set; } diff --git a/BMA.EHR.Retirement.Service/Requests/RetirementResignRequest.cs b/BMA.EHR.Retirement.Service/Requests/RetirementResignRequest.cs index e862e6dd..7f1bf500 100644 --- a/BMA.EHR.Retirement.Service/Requests/RetirementResignRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/RetirementResignRequest.cs @@ -6,24 +6,7 @@ namespace BMA.EHR.Retirement.Service.Requests public class RetirementResignRequest { public string? Location { get; set; } - public DateTime? SendDate { get; set; } - public DateTime? ActiveDate { get; set; } - public string? Reason { get; set; } - public string? Remark { get; set; } - public string? ReasonResign { get; set; } - public string? OrganizationPositionOld { get; set; } - public string? PositionExecutiveOld { get; set; } - public string? PositionTypeOld { get; set; } - public string? PositionLevelOld { get; set; } - public string? PositionNumberOld { get; set; } - public string? RemarkHorizontal { get; set; } - public double? AmountOld { get; set; } - public List? File { get; set; } - } - public class RetirementResignAdminRequest - { - public string ProfileId { get; set; } - public string? Location { get; set; } + // public DateTime? SendDate { get; set; } public DateTime? ActiveDate { get; set; } public string? Reason { get; set; } public string? Remark { get; set; } diff --git a/BMA.EHR.Retirement.Service/Requests/RetirementUpdateResignInfoRequest.cs b/BMA.EHR.Retirement.Service/Requests/RetirementUpdateResignInfoRequest.cs deleted file mode 100644 index c4dfb304..00000000 --- a/BMA.EHR.Retirement.Service/Requests/RetirementUpdateResignInfoRequest.cs +++ /dev/null @@ -1,14 +0,0 @@ -using BMA.EHR.Domain.Models.MetaData; -using Microsoft.EntityFrameworkCore; - -namespace BMA.EHR.Retirement.Service.Requests -{ - public class RetirementUpdateResignInfoRequest - { - public string? Location { get; set; } - public string? ReasonResign { get; set; } - public string? Remark { get; set; } - public DateTime? SendDate { get; set; } - public DateTime? ActiveDate { get; set; } - } -} diff --git a/BMA.EHR.Retirement.Service/Services/RetirementReportService.cs b/BMA.EHR.Retirement.Service/Services/RetirementReportService.cs deleted file mode 100644 index 48e301be..00000000 --- a/BMA.EHR.Retirement.Service/Services/RetirementReportService.cs +++ /dev/null @@ -1,698 +0,0 @@ -using BMA.EHR.Application.Responses; -using DocumentFormat.OpenXml.Packaging; -using DocumentFormat.OpenXml.Wordprocessing; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; - -namespace BMA.EHR.Retirement.Service.Services -{ - public class RetirementReportService - { - private readonly IWebHostEnvironment _environment; - private readonly ILogger _logger; - private readonly IConfiguration _configuration; - - /// - /// Initializes a new instance of the RetirementReportService class. - /// - public RetirementReportService( - IWebHostEnvironment environment, - ILogger logger, - IConfiguration configuration) - { - _environment = environment; - _logger = logger; - _configuration = configuration; - } - - #region Public Methods - - /// - /// สร้างรายงานจาก Template (.docx) - /// - public async Task GenerateReportAsync(string templateName, dynamic data, string exportType) - { - try - { - var templatePath = GetTemplatePath(templateName); - var docxBytes = await ProcessTemplateAsync(templatePath, data); - - return exportType.ToLower() == "pdf" - ? await ConvertToPdfAsync(docxBytes) - : docxBytes; - } - catch (Exception ex) - { - _logger.LogError(ex, "Error generating report"); - throw; - } - } - - #endregion - - #region Template Processing - - private string GetTemplatePath(string templateName) - { - var path = Path.Combine(_environment.ContentRootPath, "Templates", $"{templateName}.docx"); - if (!File.Exists(path)) - throw new FileNotFoundException($"Template not found: {templateName}"); - return path; - } - - private async Task ProcessTemplateAsync(string templatePath, dynamic data) - { - using var templateStream = File.OpenRead(templatePath); - using var outputStream = new MemoryStream(); - await templateStream.CopyToAsync(outputStream); - outputStream.Position = 0; - - using (var wordDoc = WordprocessingDocument.Open(outputStream, true)) - { - var mainPart = wordDoc.MainDocumentPart; - if (mainPart == null) return Array.Empty(); - - ReplacePlaceholders(mainPart, data); - wordDoc.Save(); - } - - return outputStream.ToArray(); - } - - private void ReplacePlaceholders(MainDocumentPart mainPart, dynamic data) - { - var document = mainPart.Document; - if (document == null) return; - - var processor = CreateDataProcessor(data); - processor.Process(document, new Action(FillTableRows)); - } - - #endregion - - #region Data Processing Strategy - - private IDataProcessor CreateDataProcessor(dynamic data) - { - var dataType = data.GetType(); - var isDictionary = dataType.IsGenericType && - dataType.GetGenericTypeDefinition() == typeof(Dictionary<,>); - - return isDictionary - ? new DictionaryDataProcessor(data) - : new ObjectDataProcessor(data); - } - - #endregion - - #region Table Processing - - private void FillTableRows(Document document, System.Collections.IEnumerable profiles) - { - var table = document.Descendants().FirstOrDefault(); - if (table == null) return; - - var rows = table.Elements().ToList(); - if (rows.Count == 0) return; - - var strategy = CreateTableStrategy(rows); - strategy.Process(table, rows, profiles); - } - - private static ITableStrategy CreateTableStrategy(List rows) - { - // retire-1 format: 1 row, 1 cell, 1 paragraph - if (IsSingleParagraphFormat(rows)) - return new SingleParagraphTableStrategy(); - - // retire-1 format: 2 rows, 3 columns (root row + data row per profile) - if (IsTwoRowPerProfileFormat(rows)) - return new TwoRowPerProfileTableStrategy(); - - // retire-3 format: 2+ rows (header + template) - return new MultiRowTableStrategy(); - } - - private static bool IsSingleParagraphFormat(List rows) => - rows.Count == 1 && - rows[0].Elements().Count() == 1 && - rows[0].Elements().First().Elements().Count() == 1; - - private static bool IsTwoRowPerProfileFormat(List rows) => - rows.Count == 2 && - rows[0].Elements().Count() == 3 && - rows[1].Elements().Count() == 3; - - #endregion - - #region PDF Conversion - - private async Task ConvertToPdfAsync(byte[] docxBytes) - { - var tempDocx = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}.docx"); - var tempPdf = Path.ChangeExtension(tempDocx, ".pdf"); - - try - { - await File.WriteAllBytesAsync(tempDocx, docxBytes); - await ConvertToPdfInternalAsync(tempDocx, tempPdf); - return await File.ReadAllBytesAsync(tempPdf); - } - finally - { - if (File.Exists(tempDocx)) File.Delete(tempDocx); - if (File.Exists(tempPdf)) File.Delete(tempPdf); - } - } - - private async Task ConvertToPdfInternalAsync(string docxPath, string pdfPath) - { - try - { - var useDocker = _configuration.GetValue("LibreOffice:UseDocker", false); - var timeout = _configuration.GetValue("LibreOffice:Timeout", 180000); - - if (useDocker) - { - await ConvertToPdfViaDockerAsync(docxPath, pdfPath, timeout); - } - else - { - // // PROD: Disabled local LibreOffice conversion - // await ConvertToPdfLocallyAsync(docxPath, pdfPath, timeout); - throw new NotSupportedException("LibreOffice conversion is disabled."); - } - } - catch (Exception ex) - { - _logger.LogError(ex, "Error converting to PDF"); - throw; - } - } - - private async Task ConvertToPdfViaDockerAsync(string docxPath, string pdfPath, int timeout) - { - var inputDir = _configuration["LibreOffice:InputDirectory"] ?? "/app/libreoffice/input"; - var outputDir = _configuration["LibreOffice:OutputDirectory"] ?? "/app/libreoffice/output"; - var fileName = Path.GetFileName(docxPath); - var pdfName = Path.ChangeExtension(fileName, ".pdf"); - - // Ensure directories exist - Directory.CreateDirectory(inputDir); - Directory.CreateDirectory(outputDir); - - // Copy file to input folder (LibreOffice watcher will pick it up) - var inputPath = Path.Combine(inputDir, fileName).Replace('\\', '/'); - var outputPath = Path.Combine(outputDir, pdfName).Replace('\\', '/'); - - _logger.LogInformation("📤 Sending file to LibreOffice: {FileName}", fileName); - await File.WriteAllBytesAsync(inputPath, await File.ReadAllBytesAsync(docxPath)); - - // Wait for LibreOffice to convert (file watcher handles it) - var stopwatch = System.Diagnostics.Stopwatch.StartNew(); - var pollInterval = TimeSpan.FromMilliseconds(500); - - while (stopwatch.ElapsedMilliseconds < timeout) - { - if (File.Exists(outputPath)) - { - _logger.LogInformation("✅ PDF received: {PdfName} (took {ElapsedMs}ms)", pdfName, stopwatch.ElapsedMilliseconds); - - await File.WriteAllBytesAsync(pdfPath, await File.ReadAllBytesAsync(outputPath)); - - // Cleanup - try - { - if (File.Exists(outputPath)) File.Delete(outputPath); - _logger.LogDebug("🗑️ Cleaned up output file: {PdfName}", pdfName); - } - catch (Exception ex) - { - _logger.LogWarning(ex, "Failed to cleanup output file"); - } - - return; - } - - await Task.Delay(pollInterval); - } - - throw new TimeoutException($"LibreOffice conversion timed out after {timeout}ms. File not found: {outputPath}"); - } - - // // PROD: Disabled local LibreOffice conversion - // private async Task ConvertToPdfLocallyAsync(string docxPath, string pdfPath, int timeout) - // { - // var libreOfficePath = _configuration["LibreOffice:Path"] ?? GetDefaultLibreOfficePath(); - // var arguments = _configuration["LibreOffice:Arguments"] ?? "--headless --convert-to pdf --nologo --norestore"; - // var outputDir = Path.GetDirectoryName(pdfPath); - - // if (string.IsNullOrEmpty(outputDir)) - // { - // throw new DirectoryNotFoundException("Output directory cannot be determined"); - // } - - // var psi = new ProcessStartInfo - // { - // FileName = libreOfficePath, - // Arguments = $"{arguments} --outdir \"{outputDir}\" \"{docxPath}\"", - // UseShellExecute = false, - // RedirectStandardOutput = true, - // RedirectStandardError = true, - // CreateNoWindow = true - // }; - - // using var process = Process.Start(psi); - // var exited = process.WaitForExit(timeout); - - // if (!exited) - // { - // process.Kill(entireProcessTree: true); - // throw new TimeoutException($"LibreOffice conversion timed out after {timeout}ms"); - // } - - // if (process.ExitCode != 0) - // { - // var error = await process.StandardError.ReadToEndAsync(); - // throw new Exception($"LibreOffice conversion failed: {error}"); - // } - // } - - // // PROD: Disabled local LibreOffice path detection - // private static string GetDefaultLibreOfficePath() - // { - // if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - // { - // var possiblePaths = new[] - // { - // @"C:\Program Files\LibreOffice\program\soffice.exe", - // @"C:\Program Files (x86)\LibreOffice\program\soffice.exe", - // @"C:\Program Files\LibreOffice\program\soffice.com" - // }; - - // return possiblePaths.FirstOrDefault(File.Exists) - // ?? throw new FileNotFoundException("LibreOffice not found. Please install LibreOffice or configure the path in appsettings.json"); - // } - - // // Linux/Docker: use default path - // return "libreoffice"; - // } - - #endregion - } - - #region Data Processor Interfaces & Implementations - - internal interface IDataProcessor - { - void Process(Document document, Action tableFiller); - } - - internal class DictionaryDataProcessor : IDataProcessor - { - private readonly dynamic _data; - - public DictionaryDataProcessor(dynamic data) - { - _data = data; - } - - public void Process(Document document, Action tableFiller) - { - var keys = _data.Keys as System.Collections.ICollection; - if (keys == null) return; - - System.Collections.IEnumerable? profiles = null; - - foreach (string key in keys) - { - if (key.Equals("profiles", StringComparison.OrdinalIgnoreCase)) - { - profiles = _data[key] as System.Collections.IEnumerable; - continue; - } - - var valueObj = _data[key]; - if (valueObj != null && typeof(System.Collections.IEnumerable).IsAssignableFrom(valueObj.GetType()) && - valueObj.GetType() != typeof(string)) - { - continue; - } - - var value = valueObj?.ToString() ?? string.Empty; - var placeholder = $"{{{{{key}}}}}"; - TextReplacer.ReplaceAll(document, placeholder, value); - } - - if (profiles != null) - { - tableFiller(document, profiles); - } - } - } - - internal class ObjectDataProcessor : IDataProcessor - { - private readonly dynamic _data; - - public ObjectDataProcessor(dynamic data) - { - _data = data; - } - - public void Process(Document document, Action tableFiller) - { - var dataType = _data.GetType(); - var allProps = dataType.GetProperties(); - var validProps = new List(); - - foreach (var p in allProps) - { - if (p.GetIndexParameters().Length == 0) - { - validProps.Add(p); - } - } - - System.Collections.IEnumerable? profiles = null; - - foreach (var prop in validProps) - { - var propType = prop.PropertyType; - bool isEnumerable = typeof(System.Collections.IEnumerable).IsAssignableFrom(propType); - bool isString = propType == typeof(string); - - if (isEnumerable && !isString) - { - if (prop.Name.Equals("profiles", StringComparison.OrdinalIgnoreCase)) - { - profiles = prop.GetValue(_data) as System.Collections.IEnumerable; - } - continue; - } - - var value = prop.GetValue(_data)?.ToString() ?? string.Empty; - var placeholder = $"{{{{{prop.Name}}}}}"; - TextReplacer.ReplaceAll(document, placeholder, value); - } - - if (profiles != null) - { - tableFiller(document, profiles); - } - } - } - - #endregion - - #region Text Replacer - - internal static class TextReplacer - { - public static void ReplaceAll(Document document, string oldValue, string newValue) - { - bool found = false; - - // Method 1: Check within single Run - foreach (var run in document.Descendants()) - { - var textElements = run.Elements().ToList(); - if (textElements.Count == 0) continue; - - var combinedText = string.Concat(textElements.Select(t => t.Text)); - if (combinedText.Contains(oldValue)) - { - found = true; - var replacedText = combinedText.Replace(oldValue, newValue); - textElements[0].Text = replacedText; - for (int i = 1; i < textElements.Count; i++) - { - textElements[i].Text = string.Empty; - } - } - } - - // Method 2: Check across all Runs in Paragraph - foreach (var para in document.Descendants()) - { - var allRuns = para.Elements().ToList(); - if (allRuns.Count == 0) continue; - - var combinedParaText = string.Concat(allRuns.SelectMany(r => r.Elements().Select(t => t.Text))); - if (combinedParaText.Contains(oldValue)) - { - found = true; - var replacedText = combinedParaText.Replace(oldValue, newValue); - - var firstRunTexts = allRuns[0].Elements().ToList(); - if (firstRunTexts.Count > 0) - { - firstRunTexts[0].Text = replacedText; - for (int i = 1; i < firstRunTexts.Count; i++) - { - firstRunTexts[i].Text = string.Empty; - } - } - - for (int i = 1; i < allRuns.Count; i++) - { - foreach (var t in allRuns[i].Elements()) - { - t.Text = string.Empty; - } - } - } - } - - // Fallback: Check individual Text elements - if (!found) - { - foreach (var text in document.Descendants()) - { - if (!string.IsNullOrEmpty(text.Text) && text.Text.Contains(oldValue)) - { - found = true; - text.Text = text.Text.Replace(oldValue, newValue); - } - } - } - } - - public static void ReplaceInRow(TableRow row, string oldValue, string newValue) - { - bool found = false; - - foreach (var cell in row.Descendants()) - { - foreach (var para in cell.Elements()) - { - found = ReplaceInParagraph(para, oldValue, newValue) || found; - } - } - - // Fallback: Check individual Text elements - if (!found) - { - foreach (var text in row.Descendants()) - { - if (!string.IsNullOrEmpty(text.Text) && text.Text.Contains(oldValue)) - { - found = true; - text.Text = text.Text.Replace(oldValue, newValue); - } - } - } - } - - public static bool ReplaceInParagraph(Paragraph paragraph, string oldValue, string newValue) - { - bool found = false; - - var allTexts = paragraph.Descendants().ToList(); - if (allTexts.Count == 0) return false; - - var combinedParaText = string.Concat(allTexts.Select(t => t.Text)); - - if (combinedParaText.Contains(oldValue)) - { - found = true; - var replacedText = combinedParaText.Replace(oldValue, newValue); - allTexts[0].Text = replacedText; - - for (int i = 1; i < allTexts.Count; i++) - { - allTexts[i].Text = string.Empty; - } - } - - // Fallback: Check individual Text elements - if (!found) - { - foreach (var text in allTexts) - { - if (!string.IsNullOrEmpty(text.Text) && text.Text.Contains(oldValue)) - { - found = true; - text.Text = text.Text.Replace(oldValue, newValue); - } - } - } - - return found; - } - } - - #endregion - - #region Table Strategy Interfaces & Implementations - - internal interface ITableStrategy - { - void Process(Table table, List rows, System.Collections.IEnumerable profiles); - } - - internal class SingleParagraphTableStrategy : ITableStrategy - { - public void Process(Table table, List rows, System.Collections.IEnumerable profiles) - { - var cell = rows[0].Elements().First(); - var templatePara = cell.Elements().First(); - - var profileList = profiles.Cast().ToList(); - - foreach (var profile in profileList) - { - var props = profile.GetType() - .GetProperties() - .Where(p => p.GetIndexParameters().Length == 0) - .ToList(); - - var newPara = (Paragraph)templatePara.CloneNode(true); - - foreach (var prop in props) - { - var value = prop.GetValue(profile)?.ToString() ?? string.Empty; - var placeholder = $"{{{{{prop.Name}}}}}"; - TextReplacer.ReplaceInParagraph(newPara, placeholder, value); - } - - cell.Append(newPara); - } - - templatePara.Remove(); - } - } - - internal class MultiRowTableStrategy : ITableStrategy - { - public void Process(Table table, List rows, System.Collections.IEnumerable profiles) - { - var templateRowIndex = rows.Count >= 2 ? 1 : 0; - var templateRow = rows[templateRowIndex]; - templateRow.Remove(); - - var profileList = profiles.Cast().ToList(); - - // Process header row if exists - if (rows.Count >= 2) - { - ProcessHeaderRow(rows[0], profileList); - } - - // Process template rows - foreach (var profile in profileList) - { - var newRow = (TableRow)templateRow.CloneNode(true); - var props = profile.GetType() - .GetProperties() - .Where(p => p.GetIndexParameters().Length == 0) - .ToList(); - - foreach (var prop in props) - { - var value = prop.GetValue(profile)?.ToString() ?? string.Empty; - var placeholder = $"{{{{{prop.Name}}}}}"; - TextReplacer.ReplaceInRow(newRow, placeholder, value); - } - - table.AppendChild(newRow); - } - } - - private static void ProcessHeaderRow(TableRow headerRow, List profileList) - { - var firstProfile = profileList.FirstOrDefault(); - if (firstProfile == null) return; - - var props = firstProfile.GetType() - .GetProperties() - .Where(p => p.GetIndexParameters().Length == 0) - .ToList(); - - foreach (var prop in props) - { - var value = prop.GetValue(firstProfile)?.ToString() ?? string.Empty; - var placeholder = $"{{{{{prop.Name}}}}}"; - - if (!string.IsNullOrWhiteSpace(value)) - { - TextReplacer.ReplaceInRow(headerRow, placeholder, value); - } - } - } - } - - internal class TwoRowPerProfileTableStrategy : ITableStrategy - { - public void Process(Table table, List rows, System.Collections.IEnumerable profiles) - { - // retire-1 format: 2 rows per profile (root row + data row) - var rootRow = rows[0]; - var dataRow = rows[1]; - - // Remove template rows from table - rootRow.Remove(); - dataRow.Remove(); - - var profileList = profiles.Cast().ToList(); - - foreach (var profile in profileList) - { - var props = profile.GetType() - .GetProperties() - .Where(p => p.GetIndexParameters().Length == 0) - .ToList(); - - // Check root value - skip root row if empty or null - var rootValue = props.FirstOrDefault(p => p.Name.Equals("root", StringComparison.OrdinalIgnoreCase)) - ?.GetValue(profile)?.ToString() ?? string.Empty; - - // Clone root row and fill with placeholders (only if root has value) - if (!string.IsNullOrWhiteSpace(rootValue)) - { - var newRootRow = (TableRow)rootRow.CloneNode(true); - foreach (var prop in props) - { - var value = prop.GetValue(profile)?.ToString() ?? string.Empty; - var placeholder = $"{{{{{prop.Name}}}}}"; - TextReplacer.ReplaceInRow(newRootRow, placeholder, value); - } - table.AppendChild(newRootRow); - } - - // Clone data row and fill with placeholders (always show) - var newDataRow = (TableRow)dataRow.CloneNode(true); - foreach (var prop in props) - { - var value = prop.GetValue(profile)?.ToString() ?? string.Empty; - var placeholder = $"{{{{{prop.Name}}}}}"; - TextReplacer.ReplaceInRow(newDataRow, placeholder, value); - } - table.AppendChild(newDataRow); - } - } - } - - #endregion -} diff --git a/BMA.EHR.Retirement.Service/Templates/retire-1.docx b/BMA.EHR.Retirement.Service/Templates/retire-1.docx deleted file mode 100644 index aae58587..00000000 Binary files a/BMA.EHR.Retirement.Service/Templates/retire-1.docx and /dev/null differ diff --git a/BMA.EHR.Retirement.Service/Templates/retire-2.docx b/BMA.EHR.Retirement.Service/Templates/retire-2.docx deleted file mode 100644 index 4c9db823..00000000 Binary files a/BMA.EHR.Retirement.Service/Templates/retire-2.docx and /dev/null differ diff --git a/BMA.EHR.Retirement.Service/Templates/retire-3.docx b/BMA.EHR.Retirement.Service/Templates/retire-3.docx deleted file mode 100644 index 4257c5f6..00000000 Binary files a/BMA.EHR.Retirement.Service/Templates/retire-3.docx and /dev/null differ diff --git a/BMA.EHR.Retirement.Service/Templates/retire-emp-1.docx b/BMA.EHR.Retirement.Service/Templates/retire-emp-1.docx deleted file mode 100644 index 28e5c9ea..00000000 Binary files a/BMA.EHR.Retirement.Service/Templates/retire-emp-1.docx and /dev/null differ diff --git a/BMA.EHR.Retirement.Service/Templates/retire-emp-2.docx b/BMA.EHR.Retirement.Service/Templates/retire-emp-2.docx deleted file mode 100644 index 3fd290de..00000000 Binary files a/BMA.EHR.Retirement.Service/Templates/retire-emp-2.docx and /dev/null differ diff --git a/BMA.EHR.Retirement.Service/Templates/retire-emp-3.docx b/BMA.EHR.Retirement.Service/Templates/retire-emp-3.docx deleted file mode 100644 index 622f5b8e..00000000 Binary files a/BMA.EHR.Retirement.Service/Templates/retire-emp-3.docx and /dev/null differ diff --git a/BMA.EHR.Retirement.Service/appsettings.json b/BMA.EHR.Retirement.Service/appsettings.json index 1ecc2d71..18183333 100644 --- a/BMA.EHR.Retirement.Service/appsettings.json +++ b/BMA.EHR.Retirement.Service/appsettings.json @@ -1,43 +1,42 @@ { - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "Microsoft": "Information", - "System": "Warning" - } - } - }, - "ElasticConfiguration": { - "Uri": "http://192.168.1.40:9200", - "IndexFormat": "bma-ehr-log-index", - "SystemName": "retirement" - }, - "AllowedHosts": "*", - "ConnectionStrings": { - //"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB", - // "DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" - "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", - "DisciplineConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_discipline;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" - }, - "Jwt": { - "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", - "Issuer": "https://id.frappet.synology.me/realms/hrms" - }, - "EPPlus": { - "ExcelPackage": { - "LicenseContext": "NonCommercial" - } - }, - "MinIO": { - "Endpoint": "https://s3.frappet.com/", - "AccessKey": "frappet", - "SecretKey": "P@ssw0rd", - "BucketName": "bma-recruit" - }, - "Protocol": "HTTPS", - "VITE_URL_MGT": "https://bma-ehr.frappet.synology.me", - "API": "https://bma-ehr.frappet.synology.me/api/v1", - "APIV2": "https://bma-ehr.frappet.synology.me/api/v2", - "API_KEY": "fKRL16yyEgbyTEJdsMw2h64tGSCmkW685PRtM3CygzX1JOSdptT9UJtpgWwKM8FybRTJups3GTFwj27ZRvlPdIkv3XgCoVJaD5LmR06ozuEPvCCRSdp2WFthg08V5xHc56fTPfZLpr1VmXrhd6dvYhHIqKkQUJR02Rlkss11cLRWEQOssEFVA4xdu2J5DIRO1EM5m7wRRvEwcDB4mYRXD9HH52SMq6iYqUWEWsMwLdbk7QW9yYESUEuzMW5gWrb6vIeWZxJV5bTz1PcWUyR7eO9Fyw1F5DiQYc9JgzTC1mW7cv31fEtTtrfbJYKIb5EbWilqIEUKC6A0UKBDDek35ML0006cqRVm0pvdOH6jeq7VQyYrhdXe59dBEyhYGUIfozoVBvW7Up4QBuOMjyPjSqJPlMBKwaseptfrblxQV1AOOivSBpf1ZcQyOZ8JktRtKUDSuXsmG0lsXwFlI3JCeSHdpVdgZWFYcJPegqfrB6KotR02t9AVkpLs1ZWrixwz" -} + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Information", + "System": "Warning" + } + } + }, + "ElasticConfiguration": { + "Uri": "http://192.168.1.40:9200", + "IndexFormat": "bma-ehr-log-index", + "SystemName": "retirement" + }, + "AllowedHosts": "*", + "ConnectionStrings": { + //"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB", + // "DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", + "DisciplineConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_discipline;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + }, + "Jwt": { + "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", + "Issuer": "https://id.frappet.synology.me/realms/hrms" + }, + "EPPlus": { + "ExcelPackage": { + "LicenseContext": "NonCommercial" + } + }, + "MinIO": { + "Endpoint": "https://s3.frappet.com/", + "AccessKey": "frappet", + "SecretKey": "P@ssw0rd", + "BucketName": "bma-recruit" + }, + "Protocol": "HTTPS", + "API": "https://bma-ehr.frappet.synology.me/api/v1", + "APIV2": "https://bma-ehr.frappet.synology.me/api/v2", + "API_KEY": "fKRL16yyEgbyTEJdsMw2h64tGSCmkW685PRtM3CygzX1JOSdptT9UJtpgWwKM8FybRTJups3GTFwj27ZRvlPdIkv3XgCoVJaD5LmR06ozuEPvCCRSdp2WFthg08V5xHc56fTPfZLpr1VmXrhd6dvYhHIqKkQUJR02Rlkss11cLRWEQOssEFVA4xdu2J5DIRO1EM5m7wRRvEwcDB4mYRXD9HH52SMq6iYqUWEWsMwLdbk7QW9yYESUEuzMW5gWrb6vIeWZxJV5bTz1PcWUyR7eO9Fyw1F5DiQYc9JgzTC1mW7cv31fEtTtrfbJYKIb5EbWilqIEUKC6A0UKBDDek35ML0006cqRVm0pvdOH6jeq7VQyYrhdXe59dBEyhYGUIfozoVBvW7Up4QBuOMjyPjSqJPlMBKwaseptfrblxQV1AOOivSBpf1ZcQyOZ8JktRtKUDSuXsmG0lsXwFlI3JCeSHdpVdgZWFYcJPegqfrB6KotR02t9AVkpLs1ZWrixwz" +} \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 074e828b..00000000 --- a/README.md +++ /dev/null @@ -1,210 +0,0 @@ -# BMA.EHR - HRMS API Backend - -ระบบบริหารจัดการทรัพยากรบุคคล (Human Resource Management System) พัฒนาด้วยสถาปัตยกรรม Microservices บน .NET - ---- - -## Tech Stack - -| Category | Technology | -| ----------------- | ----------------------------- | -| Framework | .NET 6.0 / 7.0 / 8.0 | -| Architecture | Clean Architecture, DDD, CQRS | -| Database | MySQL (Entity Framework Core) | -| Authentication | JWT + Keycloak | -| Message Queue | RabbitMQ | -| Object Storage | MinIO | -| Background Jobs | Hangfire | -| Logging | Serilog + Elasticsearch | -| Error Tracking | Sentry | -| API Documentation | Swagger / OpenAPI | -| Containerization | Docker | -| Testing | xUnit, k6 (Load Testing) | - ---- - -## โครงสร้างโปรเจกต์ (Project Structure) - -``` -BMA.EHR.Solution.sln -├── src/ # Core Libraries -│ ├── BMA.EHR.Domain/ # Domain layer (Entities, Business Rules) -│ ├── BMA.EHR.Application/ # Application layer (Use Cases, Interfaces) -│ └── BMA.EHR.Infrastructure/ # Infrastructure layer (Data Access, External Services) -│ -└── Service/ # Microservices - ├── BMA.EHR.Command.Service/ # Command/CQRS API Gateway - ├── BMA.EHR.MetaData.Service/ # ข้อมูลอ้างอิง (คำนำหน้า, หมู่เลือด, ศาสนา ฯลฯ) - ├── BMA.EHR.Placement.Service/ # การบริจาค/สั่งย้าย/แต่งตั้ง - ├── BMA.EHR.OrganizationEmployee.Service/ # โครงสร้างองค์กรและบุคลากร - ├── BMA.EHR.Discipline.Service/ # การ discipline บุคลากร - ├── BMA.EHR.Retirement.Service/ # การเกษียณอายุราชการ - ├── BMA.EHR.Report.Service/ # รายงาน - ├── BMA.EHR.Insignia/ # เครื่องราชอิสริยาภรณ์ - ├── BMA.EHR.Leave/ # ระบบลา - └── BMA.EHR.CheckInConsumer/ # ลงเวลาปฏิบัติงาน -``` - ---- - -## โมดูลหลัก (Key Modules) - -### การบริหารทรัพยากรบุคคล - -- **Placement Service** - สั่งย้าย, แต่งตั้ง, เลื่อนตำแหน่ง, โอนย้ายบุคลากร -- **Organization Employee Service** - จัดการโครงสร้างองค์กร, ตำแหน่ง, ข้อมูลบุคลากร -- **Leave Service** - การลางาน, การอนุมัติ, วันหยุดนักขัตฤกษ์, ยอดวันลาคงเหลือ -- **Discipline Service** - การดำเนินการ discipline, การสืบสวน, เอกสารที่เกี่ยวข้อง -- **Retirement Service** - การเกษียณอายุ, เอกสาร, สิทธิประโยชน์ -- **Insignia Service** - เครื่องราชอิสริยาภรณ์และรางวัล -- **CheckIn Consumer** - ติดตามการลงเวลาปฏิบัติงาน - -### ระบบสนับสนุน - -- **Metadata Service** - ข้อมูลอ้างอิง (คำนำหน้าชื่อ, หมู่เลือด, ศาสนา, ระดับการศึกษา ฯลฯ) -- **Report Service** - สร้างรายงาน PDF/Excel -- **Command Service** - API Gateway สำหรับ CQRS command operations - -### ฟีเจอร์เด่น - -- **Real-time Notifications** - แจ้งเตือนผ่าน WebSocket -- **Background Processing** - งานที่กำหนดเวลาผ่าน Hangfire -- **Event-Driven Communication** - สื่อสารระหว่าง services ผ่าน RabbitMQ -- **Document Generation** - สร้างเอกสาร PDF/Excel -- **Audit Trail** - บันทึกประวัติการเปลี่ยนแปลงข้อมูลทั้งหมด - ---- - -## API Endpoints - -API ใช้ versioning และสามารถดูรายละเอียดได้ผ่าน Swagger UI: - -``` -/api/v1/placement # การบริจาค/สั่งย้าย/แต่งตั้ง -/api/v1/leave # ระบบลา -/api/v1/discipline # การ discipline -/api/v1/organization # โครงสร้างองค์กร -/api/v1/metadata # ข้อมูลอ้างอิง -/api/v1/retirement # การเกษียณอายุ -/api/v1/insignia # เครื่องราชอิสริยาภรณ์ -/api/v1/reports # รายงาน -``` - ---- - -## Getting Started - -### Prerequisites - -- .NET SDK 6.0 / 7.0 / 8.0 -- MySQL Server -- Keycloak (Authentication Server) -- RabbitMQ -- MinIO (Object Storage) -- Docker (สำหรับ deployment) - -### Configuration - -แต่ละ service มีไฟล์ `appsettings.json` สำหรับ config ดังนี้: - -- **JWT Authentication** - เชื่อมต่อกับ Keycloak -- **Database Connection** - MySQL connection string -- **RabbitMQ** - Message queue connection -- **MinIO** - File storage endpoint -- **Elasticsearch** - Logging endpoint -- **Mail Server** - สำหรับส่งอีเมล - -### Build & Run - -```bash -# Restore dependencies -dotnet restore - -# Build solution -dotnet build - -# Run specific service -dotnet run --project Service/BMA.EHR.Command.Service -``` - -### Docker - -```bash -# Build Docker image -docker build -t bma-ehr-service . - -# Run container -docker run -d -p 5000:80 bma-ehr-service -``` - ---- - -## Architecture - -``` -┌──────────────┐ ┌──────────────┐ ┌──────────────┐ -│ Swagger │ │ Client │ │ WebSocket │ -│ UI │ │ Apps │ │ Clients │ -└──────┬───────┘ └──────┬───────┘ └──────┬───────┘ - │ │ │ - └────────────────────┼────────────────────┘ - │ - ┌────────▼────────┐ - │ API Gateway │ - │ (Keycloak JWT) │ - └────────┬────────┘ - │ - ┌────────────────────┼────────────────────┐ - │ │ │ -┌──────▼──────┐ ┌────────▼──────┐ ┌────────▼──────┐ -│ Placement │ │ Leave │ │ Discipline │ -│ Service │ │ Service │ │ Service │ -└──────┬──────┘ └────────┬──────┘ └────────┬──────┘ - │ │ │ - └────────────────────┼────────────────────┘ - │ - ┌─────────────▼──────────────┐ - │ MySQL Database │ - │ (Entity Framework) │ - └────────────────────────────┘ - - ┌────────────────────────────┐ - │ RabbitMQ / MinIO / │ - │ Elasticsearch / Hangfire │ - └────────────────────────────┘ -``` - ---- - -## Dependencies ที่สำคัญ - -| Package | หน้าที่ | -| --------------------- | ------------------------- | -| Entity Framework Core | ORM สำหรับ MySQL | -| Serilog | Structured Logging | -| Swashbuckle | API Documentation | -| Hangfire | Background Job Processing | -| EPPlus | สร้าง/อ่านไฟล์ Excel | -| iTextSharp | สร้างไฟล์ PDF | -| RabbitMQ.Client | Message Queue | -| NEST | Elasticsearch Client | -| ThaiBahtText | แปลงตัวเลขเป็นหน่วยบาทไทย | -| NodaTime | Date/Time Handling | -| Sentry | Error Tracking | - ---- - -## Testing - -```bash -# Run unit tests -dotnet test - -# Run with coverage -dotnet test --collect:"XPlat Code Coverage" - -# Run load tests (k6) -k6 run tests/load/*.js -``` - ---- diff --git a/dotnet_keycloak_test.js b/dotnet_keycloak_test.js deleted file mode 100644 index 1e623210..00000000 --- a/dotnet_keycloak_test.js +++ /dev/null @@ -1,54 +0,0 @@ -// ทดสอบการยิง 30,000 requests ในเวลา 10 นาที โดยให้กระจายการยิงในเวลาที่ต่างๆ กัน - -import { check, sleep } from "k6"; -import http from "k6/http"; -import { Rate } from "k6/metrics"; - -export let errorRate = new Rate("errors"); - -// จำนวน request ที่ต้องการยิง - -// ระยะเวลาทดสอบทั้งหมด - -// จำนวน Virtual Users เฉลี่ยที่ต้องการ 300 users -//const averageVus = Math.ceil(totalRequests / totalDuration); -const averageVus = 300; - -export let options = { - stages: [ - { duration: "2m", target: averageVus * 0.5 }, // 20% ของการทดสอบ เพิ่ม VUs เป็น 50% ของค่าเฉลี่ย - { duration: "4m", target: averageVus }, // 40% ของการทดสอบ เพิ่ม VUs เป็น 100% ของค่าเฉลี่ย - { duration: "2m", target: averageVus * 1.5 }, // 20% ของการทดสอบ เพิ่ม VUs เป็น 150% ของค่าเฉลี่ย - { duration: "2m", target: 0 }, // ลด VUs ลงมาเป็น 0 - ], - thresholds: { - errors: ["rate<0.01"], // อัตรา error ต้องน้อยกว่า 1% - http_req_duration: ["p(95)<2000"], // 95% ของ requests ควรใช้เวลาไม่เกิน 2 วินาที - }, -}; - -export default function () { - // ตัวเลือก headers - let headers = { - "Content-Type": "application/json", - Authorization: - "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ4WTJWUi1FRnZ2TlBzTXMzOXU4b29WQldRTDZtUHdyTkpPaDNrb0pGVGdVIn0.eyJleHAiOjE3NzYyMTkxNjgsImlhdCI6MTc2ODQ0MzE2OCwianRpIjoiZDQxMmI5MWEtZmZhMi00N2JiLTliZDUtZDE5NTdmMDFjYzQyIiwiaXNzIjoiaHR0cHM6Ly9ocm1zLWlkLmJhbmdrb2suZ28udGgvcmVhbG1zL2hybXMiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiYmFmYzU3OTUtYmVmYy00ZDNmLWE0NjEtMzUzM2MzOGE1ZmMxIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiZ2V0dG9rZW4tY2hlY2tpbiIsInNpZCI6IjBkNzdiY2Y5LTE4YWQtNGQyMS1hYjBjLTI4Y2ZiZjUyZGZiNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cHM6Ly9ocm1zLmJhbmdrb2suZ28udGgiLCJodHRwczovL2hybXMtY2hlY2tpbi5iYW5na29rLmdvLnRoIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJTVVBFUl9BRE1JTiIsInN0b3JhZ2VfbWFuYWdlbWVudCIsIm9mZmxpbmVfYWNjZXNzIiwiU1RBRkYiLCJkZWZhdWx0LXJvbGVzLWhybXMiLCJ1bWFfYXV0aG9yaXphdGlvbiIsIkFETUlOIiwiVVNFUiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoiZW1haWwgb3BlbmlkIHByb2ZpbGUiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsInJvbGUiOlsiU1VQRVJfQURNSU4iLCJzdG9yYWdlX21hbmFnZW1lbnQiLCJvZmZsaW5lX2FjY2VzcyIsIlNUQUZGIiwiZGVmYXVsdC1yb2xlcy1ocm1zIiwidW1hX2F1dGhvcml6YXRpb24iLCJBRE1JTiIsIlVTRVIiXSwibmFtZSI6IuC4p-C4seC4meC5gOC4ieC4peC4tOC4oSDguInguLHguJXguKPguJfguK3guIciLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiIzMTIwMjAwNDI0OTc1IiwiZ2l2ZW5fbmFtZSI6IuC4p-C4seC4meC5gOC4ieC4peC4tOC4oSIsImZhbWlseV9uYW1lIjoi4LiJ4Lix4LiV4Lij4LiX4Lit4LiHIn0.UhMn0NEkymPxMAcb4noZedHCSqXotCyD2RziBtLYHn5OhA9yk1915Rrt9iV4wVaebr74iZ2eZMpBwp8YVy8-3cPXSv9T3vzbXwFP7IeICPCDDf4bOPFEHP5FYow2s9v48qG81wnu01AG7_EL2-CQKh1sBVrCVUUlATlf-P4lT_lHeHOCKNXTmw4V0IWm96ec6pk-jFY3KH2JdRSWR7wq8g-KVxhLOxk_pF72kMwOpdvcr_99byg28zzj6QfeNYXLt61koHXnZppUqytt86mQQgfamv2FNVywCEzbRITUceu2rmJnwQE8ubeoCh4UOsYauUuSKd7RPqvvXxL_Vg__8Q", - //"Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJTT2wwWmFidm9rRzZET3pDZVBtT09Kek5haTdMUldkci1zV3lEYjRELTc0In0.eyJleHAiOjE3Njg4ODAzMjgsImlhdCI6MTc2ODc5MzkyOCwianRpIjoiMDYxODBlMWYtNTQzYy00MjU0LWFmN2QtYWI1NDA5NzFmNWY2IiwiaXNzIjoiaHR0cHM6Ly9ocm1zYmtrLWlkLmNhc2UtY29sbGVjdGlvbi5jb20vcmVhbG1zL2hybXMiLCJhdWQiOlsiYWNjb3VudCIsImdldHRva2VuIl0sInN1YiI6IjQzOWZhMzZkLTZiYzUtNGVmNS05NWFhLWVmMjllNjRkMmU5ZiIsInR5cCI6IkJlYXJlciIsImF6cCI6ImdldHRva2VuIiwic2lkIjoiZGI2YzUxNjItNzZhYS00MmVmLWI0ZDMtYThmOTk2N2NjZWM2IiwiYWNyIjoiMSIsImFsbG93ZWQtb3JpZ2lucyI6WyIqIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJTVVBFUl9BRE1JTiIsIm9mZmxpbmVfYWNjZXNzIiwiU1RBRkYiLCJkZWZhdWx0LXJvbGVzLWhybXMiLCJ1bWFfYXV0aG9yaXphdGlvbiIsIkFETUlOIiwiVVNFUiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoiZW1haWwgb3BlbmlkIHByb2ZpbGUiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsInJvbGUiOlsiU1VQRVJfQURNSU4iLCJvZmZsaW5lX2FjY2VzcyIsIlNUQUZGIiwiZGVmYXVsdC1yb2xlcy1ocm1zIiwidW1hX2F1dGhvcml6YXRpb24iLCJBRE1JTiIsIlVTRVIiXSwibmFtZSI6IuC4p-C4seC4meC5gOC4ieC4peC4tOC4oSDguInguLHguJXguKPguJfguK3guIciLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiIzMTIwMjAwNDI0OTc1IiwiZ2l2ZW5fbmFtZSI6IuC4p-C4seC4meC5gOC4ieC4peC4tOC4oSIsImZhbWlseV9uYW1lIjoi4LiJ4Lix4LiV4Lij4LiX4Lit4LiHIn0.fHdMzpHMD4JcbzYnUrfM473FSXka2Z4lz_S3HI2c-dPXfO5ATpijqsi12C6-ExE0RJRXUK671erMuyVXL6u2qj-FvdliBL3ubKy4J3jIT3svkcZxZL2ib16dRg375dITefvqd-J4vw6MR4bq8YAGPbqRIy6BQ2pdEiZgNiwUUihHAFwZlVER1lNbaqlbL6vk_L4k-g25DBVnDr756BFvrw7zEDbawkKZ31EZF5_DYk4RWej0wvWrGHQWLw-RyzYVSBB_AooqHkncHn_CwLBGC5juOEfFO4a2ThuKwoxYCstjtBj-zmjpHFs-Hh3CBTWJCGFcKst1Ey28StlKtNkLiw", - }; - - // ส่ง GET request - let response = http.get( - //"https://bma-hrms.bangkok.go.th/api/v1/leave/fake-check-in", - //"https://hrmsbkk.case-collection.com/api/v1/org/dotnet/keycloak/439fa36d-6bc5-4ef5-95aa-ef29e64d2e9f", - "https://hrms.bangkok.go.th/api/v1/org/dotnet/keycloak/bafc5795-befc-4d3f-a461-3533c38a5fc1", - { headers: headers }, - ); - - // ตรวจสอบการตอบสนอง - check(response, { - "is status 200": (r) => r.status === 200, - }); - - // หน่วงเวลา 1 วินาที - sleep(1); -} diff --git a/dotnet_leave_test.js b/dotnet_leave_test.js deleted file mode 100644 index 658848ec..00000000 --- a/dotnet_leave_test.js +++ /dev/null @@ -1,47 +0,0 @@ -// ทดสอบการยิง 30,000 requests ในเวลา 10 นาที โดยให้กระจายการยิงในเวลาที่ต่างๆ กัน - -import { check, sleep } from "k6"; -import http from "k6/http"; -import { Rate } from "k6/metrics"; - -export let errorRate = new Rate("errors"); - -// จำนวน request ที่ต้องการยิง - -// ระยะเวลาทดสอบทั้งหมด - -// จำนวน Virtual Users เฉลี่ยที่ต้องการ 300 users -//const averageVus = Math.ceil(totalRequests / totalDuration); -const averageVus = 300; - -export let options = { - stages: [ - { duration: "2m", target: averageVus * 0.5 }, // 20% ของการทดสอบ เพิ่ม VUs เป็น 50% ของค่าเฉลี่ย - { duration: "4m", target: averageVus }, // 40% ของการทดสอบ เพิ่ม VUs เป็น 100% ของค่าเฉลี่ย - { duration: "2m", target: averageVus * 1.5 }, // 20% ของการทดสอบ เพิ่ม VUs เป็น 150% ของค่าเฉลี่ย - { duration: "2m", target: 0 }, // ลด VUs ลงมาเป็น 0 - ], - thresholds: { - errors: ["rate<0.01"], // อัตรา error ต้องน้อยกว่า 1% - http_req_duration: ["p(95)<2000"], // 95% ของ requests ควรใช้เวลาไม่เกิน 2 วินาที - }, -}; - -export default function () { - // ตัวเลือก headers - let headers = { - "Content-Type": "application/json", - Authorization: "Bearer {Token}", - }; - - // ส่ง GET request - let response = http.get("https://{URL}", { headers: headers }); - - // ตรวจสอบการตอบสนอง - check(response, { - "is status 200": (r) => r.status === 200, - }); - - // หน่วงเวลา 1 วินาที - sleep(1); -}